Posted Wed, 22 Apr 2020 17:41:14 GMT by

I have developed an Intermapper (6.3.1) custom command line probe that uses python and returns detailed fault information from my 3rd party device. I can display this information in the probe status view, and use it to change the colour and state of the device icon. I can generate a descriptive custom fault string in my probe that details the active fault(s), as several different faults could all set the device to the same state, ie 'warning' on an exit code = 1 

How can I write this custom string to the event log file when the various faults occur?

Posted Tue, 28 Apr 2020 21:09:55 GMT by

Hi James,

Thanks for the question. The reference for this is the Developer Guide Command-line probe section.

Text sent to stdout should be available as a reason string and print to the Event Log. I tested this using the sample python probe linked to the page above. It is a probe which randomly changes the device state, so I just imported the probe, assigned it to a device and watched for changes in the Event Log.

They appeared as expected. Looking at the sample probe, I noted that they are the result of a print statement in the python scitpt immediately preceding the sys.exit(result) statement.

If this isn't helpful, feel free to send a copy of your probe to [email protected] and we'll take a look.

Posted Thu, 30 Apr 2020 21:36:03 GMT by

Hi Mike,


That’s great it is exactly what I needed, and I now have it working in my python command line probe using the specially formulated print string to set the reason string as well as the returned information in the icon label.


One thing I notice however is that the reason string I return form my script changes as expected when the list of different active faults returned from my device changes, and I can correctly see the current reason string at the bottom of the probe status window. However, despite the reason string changing, the new changed value does not get written to the event log. The only entry in the event log is for the value of the reason string when the exit code of the probe changed.


Is there a way I can get the probe to write to the event log whenever the exit code changes OR whenever the reason string changes, as long as it is in a non 'OK' state?


Failing that, is there a way I can just get the probe to write to the event log with the current reason string every time it is polled, as long as it is in a non 'OK' state?


Thanks in advance

You must be signed in to post in this forum.