Hi Michael,

Below configuration works for me to monitor multiple custom windows
services,


object CheckCommand "RabbitMQ" {
    import "plugin-check-command"

    command = [ PluginDir + "/check_service.exe" ]

    arguments = {
        "-w" = {
            set_if = "$service_win_warn$"
            description = "Warn instead of critical when service is not
running"
        }
        "-s" = {
            value = "$service_win_service$"
            required = true
            description = "Service to check"
        }
    }
    vars.service_win_service = "RabbitMQ"
    vars.service_win_warn = 1.0
}

apply Service "RabbitMQ" {
  import "generic-service"

  check_command = "service-windows"

  assign where host.name == NodeName
}

If you want me, I am up for Documentation.

Regards,
Tejas



On Fri, Jun 12, 2015 at 1:35 PM, Tejas Gadaria <[email protected]>
wrote:

> Hi Michael,
>
> I have configured custom service monitoring with below configuration,
> Currently I am using two services for testing purpose.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *object CheckCommand "service-windows" {    import
> "plugin-check-command"        command = [ PluginDir + "/check_service.exe"
> ]        arguments = {        "-w" = {            set_if =
> "$service_win_warn$"        }        "-s" = {            value =
> "$service_win_service$"        }    }    vars.service_win_service =
> "JTS_SERVICE"    vars.service_win_service = "RabbitMQ"
> vars.service_win_warn = 2.0}*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *apply Service "JTS_SERVICE" {  import "generic-service"  check_command =
> "service-windows"  assign where host.name <http://host.name> ==
> NodeName}apply Service "RabbitMQ" {  import "generic-service"
> check_command = "service-windows"  assign where host.name
> <http://host.name> == NodeName}*
>
> The above configuration works fine for 1 service only.
> When we add more than one service in above configuration, we are not being
> notified until all services are down.
>
> Any help will be appreciated.
>
> Regards,
> Tejas
>
> On Tue, Jun 9, 2015 at 3:50 PM, Michael Friedrich <
> [email protected]> wrote:
>
>>  Hi,
>>
>> Am 09.06.2015 um 12:00 schrieb Tejas Gadaria:
>>
>>   Hi Michael,
>>
>>  As long as it's open source I am in.
>>
>>
>> Icinga is driven by the spirit of open source - developing awesome
>> software whilst helping each other :)
>>
>> Enterprise or open core versions are something I consider harmful for
>> open source communities and their joy working together as a team, so it
>> just won't happen.
>>
>> Regarding your initial problem, I'd say there are 4 components involved:
>>
>> - check plugin and its parameters
>> - check command definition and arguments for the plugin call
>> - integration into host/service checks
>> - modeling into the satellite/client use case
>>
>> The last one in combination with Windows is probably the worst
>> documented, so I am eager to solve your problem by example, and then
>> generate some useful documentation for others looking into the same issue :)
>>
>>
>> Kind regards,
>> Michael
>>
>>
>>
>>
>>  Regards,
>>  Tejas
>>
>> On Tue, Jun 9, 2015 at 1:30 PM, Michael Friedrich <
>> [email protected]> wrote:
>>
>>>  Am 09.06.2015 um 09:57 schrieb Tejas Gadaria:
>>>
>>>  Can you provide sample config OR documentation reference to monitor
>>> custom windows services?
>>>
>>>
>>> No. I'm reading and writing here to help you solve your problems, not
>>> replacing it with some generic docs or howto (which do not exist anyway).
>>> The offer stands - after your problem is resolved, you'll help write
>>> documentation for the official docs.
>>>
>>> Kind regards,
>>> Michael
>>>
>>>
>>>
>>>  Regards,
>>>  Tejas
>>>
>>> On Tue, Jun 9, 2015 at 1:14 PM, Michael Friedrich <
>>> [email protected]> wrote:
>>>
>>>> Am 09.06.2015 um 09:28 schrieb Tejas Gadaria:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am using below configuration to monitor windows service through
>>>>> "service_check",
>>>>>
>>>>> /object CheckCommand "service" {
>>>>>      import "plugin-check-command"
>>>>>
>>>>>      command = [ PluginDir + "/check_service" ]
>>>>>
>>>>>      arguments = {
>>>>>          "-s" = "$service_name$"
>>>>>      }
>>>>>      vars.service_name = "RabbitMQ"
>>>>> }
>>>>>
>>>>> apply Service "RabbitMQ" {
>>>>>    import "generic-service"
>>>>>
>>>>>    check_command = "service-windows"
>>>>>
>>>>
>>>> That's not a reference to your CheckCommand definition defined above.
>>>>
>>>> Kind regards,
>>>> Michael
>>>>
>>>>
>>>>>    assign where host.name <http://host.name> == NodeName
>>>>> }/
>>>>>
>>>>> I am able to add remote machine service in icinga dash board but
>>>>> service
>>>>> shows "UNKOWN" also throwing below message as plug-in output,
>>>>>
>>>>> "Non-optional macro 'service_win_service' used in argument '-s' is
>>>>> missing while executing command 'service-windows' for object
>>>>> 'JIVVDPMGWAPP08.zeomega.loc!JTS_SERVICE'"
>>>>>
>>>>> Also when I am running same command in windows command prompt it is
>>>>> working,
>>>>> /check_service.exe -s RabbitMq
>>>>> SERVICE OK RUNNING | service=4;!4;!4;1;7/
>>>>>
>>>>> Is this a bug or configuration issue?
>>>>> Need help on this
>>>>>
>>>>> Regards,
>>>>> Tejas
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> icinga-users mailing list
>>>>> [email protected]
>>>>> https://lists.icinga.org/mailman/listinfo/icinga-users
>>>>>
>>>>>
>>>>
>>>> --
>>>> https://twitter.com/dnsmichi
>>>> https://github.com/dnsmichi
>>>> http://www.legendiary.at
>>>> _______________________________________________
>>>> icinga-users mailing list
>>>> [email protected]
>>>> https://lists.icinga.org/mailman/listinfo/icinga-users
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> icinga-users mailing 
>>> [email protected]https://lists.icinga.org/mailman/listinfo/icinga-users
>>>
>>>
>>>
>>> --
>>>  Michael Friedrich, DI (FH)
>>> Application Developer
>>>
>>> NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
>>> Tel: +49 911 92885-0 | Fax: +49 911 92885-77
>>> GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
>>> http://www.netways.de | [email protected]
>>>
>>> ** OSBConf 2015 - September - osbconf.org **
>>> ** OSMC 2015 - November - netways.de/osmc **
>>>
>>> _______________________________________________
>>> icinga-users mailing list
>>> [email protected]
>>> https://lists.icinga.org/mailman/listinfo/icinga-users
>>>
>>>
>>
>>
>> _______________________________________________
>> icinga-users mailing 
>> [email protected]https://lists.icinga.org/mailman/listinfo/icinga-users
>>
>>
>>
>> --
>> Michael Friedrich, DI (FH)
>> Application Developer
>>
>> NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
>> Tel: +49 911 92885-0 | Fax: +49 911 92885-77
>> GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
>> http://www.netways.de | [email protected]
>>
>> ** OSBConf 2015 - September - osbconf.org **
>> ** OSMC 2015 - November - netways.de/osmc **
>>
>> _______________________________________________
>> icinga-users mailing list
>> [email protected]
>> https://lists.icinga.org/mailman/listinfo/icinga-users
>>
>>
>
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to