So far, so good. Applying this function on the ‘Appearance’ of a device works perfect. But how can this be turned into a (function) probe?
If I use the above function when I create a new function-probe and apply that probe to a device, the probe will return “parse error” (and The Dude will start crashing… that’s not good ). What should the function return? True? “true”? 1? How can I ‘produce’ a boolean true?
And what should be put in the “Error” field of the function-probe?
1 or any other nonzero number stands for true and 0 stands for false.
‘Available’ should contain function returns 1 only if such service is present
on device.
‘Error’ should contain function that returns empty string when service is
actually working. If returned string is not empty it is put into services
problem description.
‘Value’ should contain function that returns numerical value that in some way
describes the performance of the service.
For anyone else trying the same thing (OUTLOOK.EXE could be any other process, of course):
Available: if(array_find(oid_column(“1.3.6.1.2.1.25.4.2.1.2”),“OUTLOOK.EXE”)>0, 1, -1) Error: if(array_find(oid_column(“1.3.6.1.2.1.25.4.2.1.2”),“OUTLOOK.EXE”)>0, “”, “OUTLOOK.EXE not detected by SNMP probe”) Value: 1
(I return 1 when the process is running so you get a graph 1 high when the process is up and 0 when not)