Goodmorning,
I've got an SNMP sensor that monitor the bandwidth of a line and I set a limit (in the channel) to show the warning and error status (my line is a 8Mb so if the bandwidth is >= 6.5Mb is warning, >= 7.5Mb is error). The sensor works well but I've got a problem: during the night I send a DR on a remote site so the bandwidth is full (8Mb) for some ours: can I schedule the time when the LIMITS of a sensor are up?
I can't pause the sensor cause it tells me even if the line is working.
I know that I can create two sensor: one for the bandwidth and one for the status up/down of the line, but I'm curious to know if there's another way to achieve this.
Article Comments
Thanks for the reply, could you give me a tutorial about this? I'm not sure to understand what to do!
Mar, 2016 - Permalink
There you go: click!
Skip step 4 entirely and replace the state trigger in step 5 with a threshold trigger (and set the values accordingly). Remember to add a schedule to the notification as well so it only alerts during the day for the normal values :)
Add another notification the same way with higher threshold values that only alerts during the night (in case it escalates).
See also the Paessler website: How to set up notifications via the PRTG web interface.
Mar, 2016 - Permalink
This might be WAY too hard for you to setup, but I have plans to setup this up in the next few months.
In the comments section of the sensor, add a comment that details the schedule and thresholds, eg:
<AdvancedSchedule> Channel,Start,Stop,UpperWarn,UpperError,LowerWarn,LowerError 1,07:00,19:00,6.5,7.5,, #Business hours, warn at 6.5 and error at 7.5 1,19:01,6:59,,,, #no warnings or errors </AdvancedSchedule>
Now comes the fun part, have a scheduled task that enumerates through all the sensors, looking for ones with comments that contain <AdvancedSchedule> (You can also add a tag to the sensor and filter by it).
When you find an advanced schedule, you use more API calls to change the thresholds for the channel.
PRTG pseudo code for the scheduled task
import-module PRTGAdminModule.psm1 $sensors = get-PRTGsensors -filter AdvancedSchedule foreach ($sensor in $sensors){ $aas = Get-PRTGActiveAdvancedSchedule -FromComments $sensor.comments Set-PRTGChannelSettings -Channel $aas.channel -UpperWarning $aas.upperwarn -UpperError $aas.uppererror }
Get-PRTGActiveAdvancedSchedule would return only the "active" row based on the current time.
Of course it would need to be a little more details that this (say to handle multiple channels), it would be a good days work.
Mar, 2016 - Permalink
Ambitious project, could turn out pretty interesting! Looking forward to it :)
Mar, 2016 - Permalink
Stephan, I think your comment above "Ambitious project" was relating to my post, but my port never got posted.
Mar, 2016 - Permalink
I have put something together that may help certain people: https://thedomainiown.wordpress.com/prtg-related/advanced-scheduling/
In short does what my post above state: It lets you have different thresholds at different times of the day.
Mar, 2016 - Permalink
Hi Andrew,
That's nifty! :) If you like, you can create a KB article from it (it will probably get lost within this thread).
Days of week would be rather easy to implement. Simply add another column WeekDays and check if the current weekday is present before executing the API call :)
Greetings,
Stephan
Mar, 2016 - Permalink
Stephen, Let me make those changes (I have been very busy with the Powershell module today). Once I post the update (and maybe others have confirmed its useful) Then you can put up a KB article.
Mar, 2016 - Permalink
You could create a seperate notification that runs using a schedule; this way you won't be alerted at night. Would this be an option for you? You'll have to remove the limits and work with threshold triggers though...
Mar, 2016 - Permalink