@@ -2,7 +2,7 @@ This plugin seeks to solve the problem of my passive checks that don't have serv
...
@@ -2,7 +2,7 @@ This plugin seeks to solve the problem of my passive checks that don't have serv
I have a bunch using my ultra cool check_citrix_user plugin that does passive submission, but don't want to go through and create all the users that might be logging in. I'd rather have the services just magically show up.
I have a bunch using my ultra cool check_citrix_user plugin that does passive submission, but don't want to go through and create all the users that might be logging in. I'd rather have the services just magically show up.
The process is that this plugin runs every 5 minutes - looks for all the undefined services that come in via NSCA. These are identifiable by the string "Warning: Passive check result was received for service '<servicename>' on host '<hostname>', but the service could not be found!" When it sees them it will compare them to services that do exist (in case it has already done it's magic) and if it still doesn't exist it will create it using a template (not Nagios template, but rather a .cfg file template) specified on the command line.
The process is that this plugin runs every 5 minutes - looks for all the undefined services that come in via NSCA. These are identifiable by the string "Warning: Passive check result was received for service '<servicename>' on host '<hostname>', but the service could not be found!" in nagios.log. When it sees them it will compare them to services that do exist (in case it has already done it's magic) and if it still doesn't exist it will create it using a template (not Nagios template, but rather a .cfg file template) specified on the command line.
unconfiguredServiceMatch=re.compile(r"(^.*Passive check result was received for service ')(.*?)(' on host ')(.*?)(', but the service could not be found)")
# Borrowing some code from my other project (should turn it into a module I suppose)