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.
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
root@icingaserver:~# icinga2 object list -t Service -n '*!nrpe-disk-/'
Object 'icingaclient.educatio.intra!nrpe-disk-/' of type 'Service':
% declared in
'/etc/icinga2/repository.d/hosts/icingaclient.educatio.intra/nrpe_disk.conf',
lines 1:0-1:27
* __name = "icingaclient.educatio.intra!nrpe-disk-/"
* action_url = ""
* check_command = "nrpe"
% = modified in
'/etc/icinga2/repository.d/hosts/icingaclient.educatio.intra/nrpe_disk.conf',
lines 4:3-4:24
* check_interval = 60
% = modified in '/etc/icinga2/zones.d/global-templates/templates.conf',
lines 28:3-28:21
* check_period = ""
* command_endpoint = ""
* display_name = "nrpe-disk-/"
* enable_active_checks = true
* enable_event_handler = true
* enable_flapping = false
* enable_notifications = true
* enable_passive_checks = true
* enable_perfdata = true
* event_command = ""
* flapping_threshold = 30
* groups = [ ]
* host_name = "icingaclient.educatio.intra"
% = modified in
'/etc/icinga2/repository.d/hosts/icingaclient.educatio.intra/nrpe_disk.conf',
lines 3:3-3:43
* icon_image = ""
* icon_image_alt = ""
* max_check_attempts = 5
% = modified in '/etc/icinga2/zones.d/global-templates/templates.conf',
lines 27:3-27:24
* name = "nrpe-disk-/"
* notes = ""
* notes_url = ""
* package = "_etc"
* retry_interval = 30
% = modified in '/etc/icinga2/zones.d/global-templates/templates.conf',
lines 29:3-29:22
* templates = [ "nrpe-disk-/", "generic-service" ]
% = modified in
'/etc/icinga2/repository.d/hosts/icingaclient.educatio.intra/nrpe_disk.conf',
lines 1:0-1:27
% = modified in '/etc/icinga2/zones.d/global-templates/templates.conf',
lines 26:1-26:34
* type = "Service"
* vars
* nrpe_arguments = [ "20%", "10%", "/" ]
% = modified in
'/etc/icinga2/repository.d/hosts/icingaclient.educatio.intra/nrpe_disk.conf',
lines 6:3-6:45
* nrpe_command = "check_disk"
% = modified in
'/etc/icinga2/repository.d/hosts/icingaclient.educatio.intra/nrpe_disk.conf',
lines 5:3-5:34
* volatile = false
* zone = ""
root@icingaserver:~# icinga2 object list -t CheckCommand -n 'nrpe'
Object 'nrpe' of type 'CheckCommand':
% declared in '/usr/share/icinga2/include/command-plugins.conf', lines
1466:1-1466:26
* __name = "nrpe"
* arguments
% = modified in '/usr/share/icinga2/include/command-plugins.conf', lines
1472:3-1498:2
* -4
* description = "Use IPv4 only"
* set_if = "$nrpe_ipv4$"
* -6
* description = "Use IPv6 only"
* set_if = "$nrpe_ipv6$"
* -H = "$nrpe_address$"
* -a
* order = 1
* repeat_key = false
* value = "$nrpe_arguments$"
* -c = "$nrpe_command$"
* -n
* description = "Do not use SSL."
* set_if = "$nrpe_no_ssl$"
* -p = "$nrpe_port$"
* -t = "$nrpe_timeout$"
* -u
* description = "Make socket timeouts return an UNKNOWN state instead of
CRITICAL"
* set_if = "$nrpe_timeout_unknown$"
* command = [ "/usr/lib/nagios/plugins/check_nrpe" ]
% = modified in '/usr/share/icinga2/include/command-plugins.conf', lines
1470:2-1470:40
* env = null
* execute
% = modified in 'methods-itl.conf', lines 33:2-33:22
* type = "Function"
* name = "nrpe"
* package = "_etc"
* templates = [ "nrpe", "plugin-check-command", "ipv4-or-ipv6" ]
% = modified in '/usr/share/icinga2/include/command-plugins.conf', lines
1466:1-1466:26
% = modified in 'methods-itl.conf', lines 32:1-32:44
% = modified in '/usr/share/icinga2/include/command-plugins.conf', lines
20:1-20:36
* timeout = 300
% = modified in '/usr/share/icinga2/include/command-plugins.conf', lines
1506:2-1506:13
* type = "CheckCommand"
* vars
* check_address
% = modified in '/usr/share/icinga2/include/command-plugins.conf', lines
21:2-30:3
* type = "Function"
* check_ipv4 = "$nrpe_ipv4$"
% = modified in '/usr/share/icinga2/include/command-plugins.conf', lines
32:2-32:24
% = modified in '/usr/share/icinga2/include/command-plugins.conf', lines
1503:2-1503:32
* check_ipv6 = "$nrpe_ipv6$"
% = modified in '/usr/share/icinga2/include/command-plugins.conf', lines
33:2-33:24
% = modified in '/usr/share/icinga2/include/command-plugins.conf', lines
1504:2-1504:32
* nrpe_address = "$check_address$"
% = modified in '/usr/share/icinga2/include/command-plugins.conf', lines
1500:2-1500:38
* nrpe_no_ssl = false
% = modified in '/usr/share/icinga2/include/command-plugins.conf', lines
1501:2-1501:25
* nrpe_timeout_unknown = false
% = modified in '/usr/share/icinga2/include/command-plugins.conf', lines
1502:2-1502:34
* zone = ""
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users