Created
October 29, 2019 08:27
-
-
Save ipcjk/670cb682d8ff0ea6b5041ee1df883def to your computer and use it in GitHub Desktop.
Check supervisor processes for checkMK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/perl | |
foreach (split /[\r\n]+/, `supervisorctl status`) { | |
/([\w\-\d_]+)\s+([A-Z]+)\s+(.*)$/; | |
if($2 eq 'RUNNING') { print "0";} else { print "1";} | |
print " $1 - $3\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
updated the script to output the full process name: