Jan C. Nielsen Posted August 12, 2020 Share Posted August 12, 2020 We have made take over from another hosting company. Now i got 130 servers without Disk-configuration notifications, as it has not been copied in deployment of Pulseway. The Policy in Pulseway is used to send critical alerts. Â How to configure over 130 servers without changeing notifications manualy? Link to comment Share on other sites More sharing options...
Administrators Paul Posted August 12, 2020 Administrators Share Posted August 12, 2020 Hi Jan, A policy can have system and non-system drives notifications configured and it should let you pick a priority. Would this not work for you? -Paul Link to comment Share on other sites More sharing options...
Jan C. Nielsen Posted August 13, 2020 Author Share Posted August 13, 2020 (edited) 22 hours ago, Paul said: Hi Jan, A policy can have system and non-system drives notifications configured and it should let you pick a priority. Would this not work for you? -Paul no - i would like to have a critical and an evaluated Pulseway policy on ram,cpu,disk, but it is not possible. is it possible to make a Batch/script update of the 130 servers Pulseway configuration? Edited August 13, 2020 by Jan C. Nielsen Link to comment Share on other sites More sharing options...
Administrators Paul Posted August 13, 2020 Administrators Share Posted August 13, 2020 Yes, it's possible, tell me what you need I'll make it happen. -Paul Link to comment Share on other sites More sharing options...
Jan C. Nielsen Posted August 13, 2020 Author Share Posted August 13, 2020 14 minutes ago, Paul said: Yes, it's possible, tell me what you need I'll make it happen. -Paul Polycy or script??? Need Evaluated disk size to 10% and disk size 2Gb Critical - CPU 90% Evaluated 15 minuts, CPU 90% Chritical 60 minuts - ram 3% Evaluated 15 minuts, ram 3% Chritical 60 minuts. Is it possible to change til configuration/notifications on the local server, without logging in to 130 servers? Link to comment Share on other sites More sharing options...
Administrators Paul Posted August 13, 2020 Administrators Share Posted August 13, 2020 Jan, Yes, it's possible to avoid having to connect to 130 servers however there are a couple of things to note. CPU and Memory notifications only support one threshold, only disk supports multiple thresholds. Also which partition you want me to create the notification checks for? 'c:'? -Paul Link to comment Share on other sites More sharing options...
Jan C. Nielsen Posted August 13, 2020 Author Share Posted August 13, 2020 1 hour ago, Paul said: Jan, Yes, it's possible to avoid having to connect to 130 servers however there are a couple of things to note. CPU and Memory notifications only support one threshold, only disk supports multiple thresholds. Also which partition you want me to create the notification checks for? 'c:'? -Paul some servers have a c-drive - some c- and d-drive, so i gues 2 scripts. If you have a Pulseway Polycy "Critical" on CPU/RAM, does it overrule the local "Evaluated"? Link to comment Share on other sites More sharing options...
Jan C. Nielsen Posted August 19, 2020 Author Share Posted August 19, 2020 On 8/13/2020 at 10:37 AM, Paul said: Jan, Yes, it's possible to avoid having to connect to 130 servers however there are a couple of things to note. CPU and Memory notifications only support one threshold, only disk supports multiple thresholds. Also which partition you want me to create the notification checks for? 'c:'? -Paul some servers have a c-drive - some c- and d-drive, so i gues 2 scripts. If you have a Pulseway Polycy "Critical" on CPU/RAM, does it overrule the local "Evaluated"?  Still waiting on anser ... Link to comment Share on other sites More sharing options...
Administrators Paul Posted August 19, 2020 Administrators Share Posted August 19, 2020 On 8/13/2020 at 10:55 AM, Jan C. Nielsen said: some servers have a c-drive - some c- and d-drive, so i gues 2 scripts. If you have a Pulseway Polycy "Critical" on CPU/RAM, does it overrule the local "Evaluated"? Policies always override local configuration (with the exception of the two storage notifications from the policy that target the system and non-system drives). 31 minutes ago, Jan C. Nielsen said: some servers have a c-drive - some c- and d-drive, so i gues 2 scripts. If you have a Pulseway Polycy "Critical" on CPU/RAM, does it overrule the local "Evaluated"? Â Still waiting on anser ... You can have a script check if there's a D drive to set a rule for that as well, maybe with a different threshold too. -Paul Link to comment Share on other sites More sharing options...
Jan C. Nielsen Posted August 20, 2020 Author Share Posted August 20, 2020 23 hours ago, Paul said: Policies always override local configuration (with the exception of the two storage notifications from the policy that target the system and non-system drives). You can have a script check if there's a D drive to set a rule for that as well, maybe with a different threshold too. -Paul ok - but what has to bee in the script, to change Disk-size notification on a server? Link to comment Share on other sites More sharing options...
Jan C. Nielsen Posted August 28, 2020 Author Share Posted August 28, 2020 Still waiting ... Link to comment Share on other sites More sharing options...
Jan C. Nielsen Posted September 14, 2020 Author Share Posted September 14, 2020 And waiting Link to comment Share on other sites More sharing options...
WYE Posted September 15, 2020 Share Posted September 15, 2020 Hi Jan, This is all theory - but it may point you in the right direction. Use PowerShell to update the settings for the Agent: Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'SendNotificationOnLowHDDSpace' -value '1' Then look in the HKEY_LOCAL_MACHINE\SOFTWARE\MMSOFT Design\PC Monitor\HDDList keys: It appears to have two values for each notification. I've configured two alerts for my single disk (as that's all I have on this PC) and this is what i get: You could easily use Get-Disk to figure out if there is a second disk, and if so, apply the relevant notification and configuration in the agent via the Set-ItemProperty cmdlet.  Do let us know how you get on and\or if this helps? WYE  Jan C. Nielsen 1 Link to comment Share on other sites More sharing options...
Administrators Paul Posted September 15, 2020 Administrators Share Posted September 15, 2020 I've recently built this script which also identifies the serial number of the disk to fill in the ID field: $query = 'SELECT VolumeSerialNumber FROM Win32_LogicalDisk where DriveType=3 AND Name=''' + $env:SystemDrive + '''' $serialNumber = (gwmi -Query $query).VolumeSerialNumber $count = 0 # rule 1: < 5000MB - Elevated Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Id' + $count) -Value $serialNumber Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Percentage' + $count) -Value '15' # not used Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Priority' + $count) -Value '2' # elevated Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('SizeMB' + $count) -Value '5000' Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('UsePercentage' + $count) -Value '0' $count = $count + 1 # rule 2: < 2000MB - Critical Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Id' + $count) -Value $serialNumber Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Percentage' + $count) -Value '15' # not used Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Priority' + $count) -Value '3' # critical Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('SizeMB' + $count) -Value '2000' Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('UsePercentage' + $count) -Value '0' $count = $count + 1 Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name 'Count' -Value $count Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'SendNotificationOnLowHDDSpace' -Value '1' -Paul Scott Brandt and Jan C. Nielsen 2 Link to comment Share on other sites More sharing options...
Jan C. Nielsen Posted September 23, 2020 Author Share Posted September 23, 2020 On 9/15/2020 at 1:57 PM, WYE said: Hi Jan, This is all theory - but it may point you in the right direction. Use PowerShell to update the settings for the Agent: Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'SendNotificationOnLowHDDSpace' -value '1' Then look in the HKEY_LOCAL_MACHINE\SOFTWARE\MMSOFT Design\PC Monitor\HDDList keys: It appears to have two values for each notification. I've configured two alerts for my single disk (as that's all I have on this PC) and this is what i get: You could easily use Get-Disk to figure out if there is a second disk, and if so, apply the relevant notification and configuration in the agent via the Set-ItemProperty cmdlet.  Do let us know how you get on and\or if this helps? WYE  Just what i was looking for :-) Thanks On 9/15/2020 at 2:23 PM, Paul said: I've recently built this script which also identifies the serial number of the disk to fill in the ID field: $query = 'SELECT VolumeSerialNumber FROM Win32_LogicalDisk where DriveType=3 AND Name=''' + $env:SystemDrive + '''' $serialNumber = (gwmi -Query $query).VolumeSerialNumber $count = 0 # rule 1: < 5000MB - Elevated Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Id' + $count) -Value $serialNumber Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Percentage' + $count) -Value '15' # not used Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Priority' + $count) -Value '2' # elevated Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('SizeMB' + $count) -Value '5000' Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('UsePercentage' + $count) -Value '0' $count = $count + 1 # rule 2: < 2000MB - Critical Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Id' + $count) -Value $serialNumber Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Percentage' + $count) -Value '15' # not used Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Priority' + $count) -Value '3' # critical Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('SizeMB' + $count) -Value '2000' Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('UsePercentage' + $count) -Value '0' $count = $count + 1 Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name 'Count' -Value $count Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'SendNotificationOnLowHDDSpace' -Value '1' -Paul If only your distribution tool did that - the serial af the harddisk is the same om my 130 servers... But thank you for the script to make it work :-) Link to comment Share on other sites More sharing options...
Scott Brandt Posted October 7, 2020 Share Posted October 7, 2020 Thank you, Paul. This saved me a fair bit of guess and check.  On 9/15/2020 at 7:23 AM, Paul said:  $query = 'SELECT VolumeSerialNumber FROM Win32_LogicalDisk where DriveType=3 AND Name=''' + $env:SystemDrive + '''' $serialNumber = (gwmi -Query $query).VolumeSerialNumber $count = 0 # rule 1: < 5000MB - Elevated Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Id' + $count) -Value $serialNumber Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Percentage' + $count) -Value '15' # not used Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Priority' + $count) -Value '2' # elevated Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('SizeMB' + $count) -Value '5000' Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('UsePercentage' + $count) -Value '0' $count = $count + 1 # rule 2: < 2000MB - Critical Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Id' + $count) -Value $serialNumber Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Percentage' + $count) -Value '15' # not used Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('Priority' + $count) -Value '3' # critical Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('SizeMB' + $count) -Value '2000' Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name ('UsePercentage' + $count) -Value '0' $count = $count + 1 Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\HDDList' -Name 'Count' -Value $count Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'SendNotificationOnLowHDDSpace' -Value '1' -Paul  Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now