I want to monitor a sequence of OID's of printers. As of yet monitoring a range of OID's (i.e. 1.3.6.1.4.1.1602.1.5.5.3.1.1.5.x where x is anything between 1 to 65535) is not possible in the default PRTG sensors.

So I wrote a Powershell script utilizing snmpwalk.exe something along the lines of:

snmpwalk.exe -L n: -v 1 -c $CommunityString $PrinterIP SNMPv2-SMI::enterprises.1602.1.5.5.3.1.1.5 | Where-Object { $_ -like "*The waste toner container is full."""}

This will return a result when the "waste toner container is full" error is on the display of the printer.

Now I want to create a sensor that will generate a error when this snmpwalk gives output. Is this possible within PRTG?


Article Comments

Hey nhoksbergen,

Thank you very much for your KB-posting.

This can be done, using our native EXE/Script sensor.

Kindly ensure that the returned data is in the following format: value:message

  • Value has to be a 64-bit integer or float. It will be used as the resulting value for this sensor (for example, bytes, milliseconds) and stored in the database.
  • The message can be any string (maximum length: 2000 characters).
  • The exit code of the EXE has to be one of the following values:
Value    Description
0        OK
1        WARNING
2        System Error (e.g. a network/socket error)
3        Protocol Error (e.g. web server returns a 404)
4        Content Error (e.g. a web page does not contain a required word)

Best regards,
Sven


Mar, 2017 - Permalink