check_service don't work in the right way

This forum was archived to /woltlab and is now in read-only mode.

    now i am getting the right services and states but the question is how can i intigrate it in my commands.conf?

    atm my idea is like:

    object CheckCommand "check_nrpe" {

    import "plugin-check-command"

    command = [

    PluginDir + "/check_nrpe",

    "-H", "$address$",

    "-c", "$remote_nrpe_command$",

    "-a", "service=$service$ \"crit=state='$state$'\""



    but it wont work :(


    i got a Debian 9 server with the latest Icinga2 installed and want to monitor Windows services.

    I know that it will work with "/usr/lib/nagios/plugins/check_nrpe -H -c check_service".

    But every time i want to check the service via command line i got the same output like:

    CRITICAL: WinHttpAutoProxySvc=stopped (auto), delayed (clr_optimization_v4.0.30319_32=stopped (delayed), clr_optimization_v4.0.30319_64=stopped (delayed))

    even when i add filter options.

    edit: for sure i installed NSClient++ on the Windows server!


    The post was edited 1 time, last by Lenny ().

  • You seem to have updated your initial post somehow. I cannot really see what exactly your problem is, please post such updates in a new answer.

  • Here a example with the itl command library:

    1. apply Service "wuauserv stopped and disabled" {
    2. check_command = "nrpe"
    3. vars.nrpe_command = "check_service"
    4. vars.nrpe_arguments = [ "service=wuauserv" , "crit= state = 'started' or start_type = 'auto'" , "warn=start_type = 'demand'" , "ok= state = 'stopped' and start_type = 'disabled'" , "top-syntax=%(status): %(list)" , "detail-syntax=%(name):%(state):%(start_type)" ]
    5. vars.nomail = true
    6. assign where host.vars.os == "Windows" && host.vars.enviroment == "production"
    7. ignore where host.vars.wuauservok == true
    8. }

    This is a example for checking if the windows update service is disabled