Login Monitor Script & Check MK

      No Comments on Login Monitor Script & Check MK

Last night Paul Grevink posted a nice post about the basic setup for Check MK and i am really looking forward to the rest of the series. At my current customer we are also using Check MK so i decided to use the script I made for the VMware Login monitor fling to give output usable for Check MK. At first I was messing with the plugin folder in the check mk folder on the windows server hosting the txt files but a colleague pointed me at the local folder. The big difference is that with the local folder Check MK directly uses the output and the plugin monitor it needs another python file on the check mk server to use the data.

The script:

As you can see I am not only using the average logontime as before, I also count the amount of logons in the time where we measure this time. Offcourse you can create lots more data to use in Check MK this way

The output I create:

  • The first digit is the status, 0 for ok 1 for warning and 2 for critical.
  • After that the service name that shows in Check MK
  • The come the 2 numbers we created with their own description separated by | This is used by Check MK to create a diagram
  • then separated by a space (and after this you can use spaces) the text that wil show in Check MK.

The result:

2016-08-11 21_12_01-Beheerders Desktop

The diagram:

2016-08-11 21_14_01-Beheerders Desktop

Leave a Reply