I have created some probes in Dude to monitor toner levels on our printer copiers. I followed a tutorial on the forums that was posted a while back. The probes and function for pulling the SNMP values for toner levels are working great. I am able to see the toner remaining in a percenatge format and I am able to set a threshold for when it will send me an alert (25%)
My intention is to have it send an e-mail out then toner levels reach 25% to “order more toner” The issue that I am having is the probe is considered to be “down” when an SNMP value cannot be read from the printer (because it is switched off or there was a network interruption) So of course it is sending an e-mail to “order toner” when this happens.
I have attached a screenshot of both the probe and function configuration. I know there must be a way for it to still consider the probe “up” if it pulls a null value, but I am not sure how to work it into the function/probe. I appealt o anyone who was successfull with this.
I am telling it to look at “-1” as null. The problem is I tried working this into my function a few different ways without success. I get a “parse failed” Here is an example of what I was trying:
I made the change you specified. Do you know how I would have to set up the probe? If you take a look at my first post you will see how I have the probe set up now. It looks like I need to state somewhere in the probe that if the value pulled from SNMP is “-1” to still consider it up.
I’ve had another look at what you are trying to achieve and I think the following could give you the result you are looking for.. Unfortunately my printer displays the toner quanity in minus numbers which is no help to test this probe, but I think this will work…
Thanks chrisd for all of your help. I have actually solved this in a different way. I am going to post what I have here in case anyone else runs into the same issue.
<?xml version="1.0" ?>
57
42554
toner_black
if(oid("1.3.6.1.2.1.43.11.1.1.9.1.1"),(string_substring(oid("1.3.6.1.2.1.43.11.1.1.9.1.1")/oid("1.3.6.1.2.1.43.11.1.1.8.1.1"),0,4)*100,"False")) \0d\0a\0d\0a
\
\
This works perfectly. If SNMP connectivity is lost, dude will not send out a notification. The only issue I am still having is that if the printer is showing a "toner low" status, then it loses SNMP connectivity and then comes back up, dude will re-send the notification that the toner is low. The only way I can see around this is to ack the printer when the toner low status comes on.