> On 19 Apr 2016, at 12:36, Bata Bálint András <bata.bal...@oh.gov.hu> wrote:
>
> Hi,
>
> @Gerald:
> I attached required outputs. I don't see any extraordinary thing, but I'm a 
> beginner :)
> Have you seen my last mail? The error message is:
> ('/usr/lib/nagios/plugins/check_nrpe' '-H' '' '-c' 'check_disk' '-a' '20%' 
> '10%' '/') terminated with exit code 1
> So the check_nrpe command doesn't receive host_name parameter, don't know why.

The host_name service attribute is a reference to an existing host object. That 
host object obviously does not have the “address” attribute set which is 
expected by the nrpe CheckCommand.

So the next step is to verify your host object “icingaclient.xxx.yyy” (post it 
here).

Kind regards,
Michael


>
> Thx,
> Balint
>
>
> -----Original Message-----
> From: icinga-users [mailto:icinga-users-boun...@lists.icinga.org] On Behalf 
> Of Gerald Vogt
> Sent: Tuesday, April 19, 2016 11:23 AM
> To: icinga-users@lists.icinga.org
> Subject: Re: [icinga-users] nrpe doesn´t work (Could not resolve hostname : 
> Name or service not known)
>
> What is your current active service and checkcommand?
>
> Run:
>
> # icinga2 object list -t Service -n '*!nrpe-disk-/'
> # icinga2 object list -t CheckCommand -n 'nrpe'
>
> -Gerald
>
> On 18.04.16 14:33, Bata Bálint András wrote:
>> Hi,
>>
>> @Gerald:
>>  I removed CheckCommand definition, now I use only the nrpe Service 
>> configuration, which is copied from Icinga docs:
>>
>> object Service "nrpe-disk-/" {
>>   import "generic-service"
>>   host_name = "icingaclient.xxx.yyy"
>>   check_command = "nrpe"
>>   vars.nrpe_command = "check_disk"
>>   vars.nrpe_arguments = [ "20%", "10%", "/" ] }
>>
>> But error message is the same.
>>
>>
>> @Assaf:
>> Host resolving is fine, I wrote both the short and long name to /etc/hosts.
>>
>>
>> Regards,
>> Balint
>>
>>
>>
>> -----Original Message-----
>> From: icinga-users [mailto:icinga-users-boun...@lists.icinga.org] On
>> Behalf Of Gerald Vogt
>> Sent: Monday, April 18, 2016 2:10 PM
>> To: icinga-users@lists.icinga.org
>> Subject: Re: [icinga-users] nrpe doesn´t work (Could not resolve
>> hostname : Name or service not known)
>>
>>
>> On 15.04.16 11:16, Bata Bálint András wrote:
>>> object CheckCommand "nrpe" {
>>>
>>>          import "plugin-check-command"
>>>
>>>          command = [PluginDir + "/check_nrpe" ]
>>>
>>>          arguments = {
>>>
>>>          "-H" = "$host$"
>>>
>>>          "-c" = "$check$"
>>>
>>>          "-t", "$timeout$"
>>>
>>>          "-a", "$args$"
>>>
>>>          }
>>>
>>> }
>>
>> Why do you create your own custom nrpe CheckCommand definition?
>>
>>> object Service "nrpe-disk-/" {
>>>
>>>    import "generic-service"
>>>
>>>    host_name = "icingaclient.xxx.yyy"
>>>
>>>    check_command = "nrpe"
>>>
>>>    vars.nrpe_command = "check_disk"
>>>
>>>    vars.nrpe_arguments = [ "20%", "10%", "/" ]
>>>
>>> }
>>
>> With your own definition, you have to vars.host, vars.check, vars.timeout 
>> and vars.args.
>>
>> Otherwise use the original CheckCommand which comes with icinga2 and that 
>> actually uses those arguments as defined in your service...
>>
>> -Gerald
>> _______________________________________________
>> icinga-users mailing list
>> icinga-users@lists.icinga.org
>> https://lists.icinga.org/mailman/listinfo/icinga-users
>> _______________________________________________
>> icinga-users mailing list
>> icinga-users@lists.icinga.org
>> https://lists.icinga.org/mailman/listinfo/icinga-users
>>
> _______________________________________________
> icinga-users mailing list
> icinga-users@lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users
> <object_list.txt>_______________________________________________
> icinga-users mailing list
> icinga-users@lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users


-- 
Michael Friedrich, DI (FH)
Senior Developer

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
CEO: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | michael.friedr...@netways.de

** OSDC 2016 - April - netways.de/osdc **
** OSBConf 2016 - September - osbconf.org **
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to