[Plugin] PortCheck - Check TCP port status
Posted: Sat Sep 19, 2015 7:15 am
This is new plugin I wrote to provide more granular monitoring of host status.
I found that the ping plugin was not sufficient, as a remote host may be available, but the application listening on a specific port may have crashed.
This is pretty much my first foray into anything Python, and I wrote this plugin by cannibalizing the "Ping" plugin.
Anyone who wants to review for code efficiency is welcome, I'm sure there are many things that could be done better.
That being said, v.0.2 posted here works for me.
I've included here a sample tree to show how you could use this plugin (or at least one way).
The sample has two hosts configured in the managed (watch) list. When either becomes unavailable it sends an event which triggers an OSD display for 10 seconds showing which devices are offline.
Plugin has a lot of configurable options to control when and how often to throw events, as well as what to display as output.
I am currently using this to monitor:
Web server of XBMC
Network port of Onkyo receiver
Control port of Roku
This way, if any of these don't respond I can alert the main screen. Occasionally I have had these ports become unreachable even though the devices responded to pings.
In most cases, there will have to be manual intervention to rectify the offline issues, but at least now you can know exactly what is down.
I found that the ping plugin was not sufficient, as a remote host may be available, but the application listening on a specific port may have crashed.
This is pretty much my first foray into anything Python, and I wrote this plugin by cannibalizing the "Ping" plugin.
Anyone who wants to review for code efficiency is welcome, I'm sure there are many things that could be done better.
That being said, v.0.2 posted here works for me.
I've included here a sample tree to show how you could use this plugin (or at least one way).
The sample has two hosts configured in the managed (watch) list. When either becomes unavailable it sends an event which triggers an OSD display for 10 seconds showing which devices are offline.
Plugin has a lot of configurable options to control when and how often to throw events, as well as what to display as output.
I am currently using this to monitor:
Web server of XBMC
Network port of Onkyo receiver
Control port of Roku
This way, if any of these don't respond I can alert the main screen. Occasionally I have had these ports become unreachable even though the devices responded to pings.
In most cases, there will have to be manual intervention to rectify the offline issues, but at least now you can know exactly what is down.