I'm new using nagios.
I'm configuring a test nagios environment with NRDP.
I'm using an Ubuntu 18.04 machine, nagios 4.4.1, nagios plugins 2.2.1 and nrdp 1.5.1.
I followed several tutorials and everything seems to be up and running.
The issue I'm experiencing is that I'm not able to perform a simple
test check via http://[ip_from_my_nagios]/nrdp
I've defined this command:
Code: Select all
define command {
command_name check_dummy
command_line $USER1$/check_dummy $ARG1$
}
Code: Select all
define host {
use generic-host
name passive_host
active_checks_enabled 0
passive_checks_enabled 1
flap_detection_enabled 0
register 0
check_period 24x7
max_check_attempts 1
check_interval 5
retry_interval 1
check_freshness 0
contact_groups admins
check_command check_dummy!0
notification_interval 60
notification_period 24x7
notification_options d,u,r
}
define service {
use generic-service
name passive_service
active_checks_enabled 0
passive_checks_enabled 1
flap_detection_enabled 0
register 0
check_period 24x7
max_check_attempts 1
check_interval 5
retry_interval 1
check_freshness 0
contact_groups admins
check_command check_dummy!0
notification_interval 60
notification_period 24x7
notification_options w,u,c,r
}
define host {
use passive_host
host_name jmHost
}
define service {
use passive_service
service_description CPU usage
host_name jmHost
}
define service {
use passive_service
service_description Swap Usage
host_name jmHost
}
define service {
use passive_service
service_description Memory Usage
host_name jmHost
}
define service {
use passive_service
service_description Process Count
host_name jmHost
}
define service {
use passive_service
service_description foo
host_name jmHost
}
When I submit this json message (for test purpouses)
Code: Select all
{
"checkresults": [
{
"host": {
"hostname": "jmHost",
"state": 0,
"output": "Everything looks okay! | perfdata=1;"
}
},
{
"service": {
"hostname": "jmHost",
"servicename": "foo",
"state": 1,
"output": "WARNING: Danger Will Robinson! | perfdata=1;"
}
}
]
}
on the main Nagios web page).
In the /usr/local/nagios/var/nagios.log file I see the following lines:
[1532421791] Auto-save of retention data completed successfully.
[1532424131] Error: Got host checkresult for '', but no such host can be found
[1532424131] Error: Got host checkresult for '', but no such host can be found
Additionally, if I subbmit the same json check form with a hostname that
doesn't exist (to force an error), for instance this one:
Code: Select all
{
"checkresults": [
{
"host": {
"hostname": "noExists",
"state": 0,
"output": "Everything looks okay! | perfdata=1;"
}
},
{
"service": {
"hostname": "noExists",
"servicename": "wrongService",
"state": 1,
"output": "WARNING: Danger Will Robinson! | perfdata=1;"
}
}
]
}
I've, also, observed that if I perfom a 'Submit Nagios Command' (on the NRDP web[1532431293] Error: Got host checkresult for '', but no such host can be found
[1532431293] Error: Got host checkresult for '', but no such host can be found
interface). (DISABLE_HOST_NOTIFICATIONS;localhost) It work's fine and I get
this line on nagios.log:
So, I'm suspecting a missconfiguration from my part but I cant find[1532431440] EXTERNAL COMMAND: DISABLE_HOST_NOTIFICATIONS;localhost
any clue to solve it.
Thanks in advance for your help.