RESOLVED: How can use complex password in check_http for url
Re: How can use complex password in check_http for url
You probably need to escape the password, as has been suggested.
Re: How can use complex password in check_http for url
Hi @baber, thanks for reaching out.
I think there is a bit of confusion about what you are trying to do.
For those asking about the two commands run together in the check_command, this is how the NRPE wizard sets up service definitions for check_nrpe and the plugin that it is requesting Nagios Remote Plugin Executor to execute. See Monitoring Hosts Using NRPE.
As this diagram shows, check_nrpe is executed on the monitoring (XI) server and contacts NRPE running on the "remote" server. NRPE then runs the "check command" requested by check_nrpe.
Here is an example of a default service setup by the NRPE wizard.
Which translates to...
I think there is a bit of confusion about what you are trying to do.
- Are you running XI and using NRPE to run the check_http plugin, remotely on "myurl.com"?
- Did you install the "Nagios XI Linux NRPE Agent" tarball or did you install NRPE from source?
- Can you use check_http, without using NRPE?
For those asking about the two commands run together in the check_command, this is how the NRPE wizard sets up service definitions for check_nrpe and the plugin that it is requesting Nagios Remote Plugin Executor to execute. See Monitoring Hosts Using NRPE.
As this diagram shows, check_nrpe is executed on the monitoring (XI) server and contacts NRPE running on the "remote" server. NRPE then runs the "check command" requested by check_nrpe.
Here is an example of a default service setup by the NRPE wizard.
Code: Select all
define service {
host_name 192.168.58.241
service_description Current Load
use generic-service
check_command check_nrpe!check_load! -a '-w 5,10,15 -c 10,20,30'!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard nrpe
register 1
}
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 192.168.58.241 -t 30 -c check_load -a '-w 5,10,15 -c 10,20,30'You do not have the required permissions to view the files attached to this post.
Please let us know if you have any other questions or concerns.
-Laura
-Laura
Re: How can use complex password in check_http for url
Actually I am using nagios core . Is there any solution for that ?
Re: How can use complex password in check_http for url
As I said it is working on nagios server manually such as follow
but when I use it in config file such as follow it does not work
Code: Select all
[root@nagios ~]# /usr/local/nagios/libexec/check_http -H mb.com -w 5 -c 10 -p 8980 -u /mb/ai/branch/all -a mba:785\!"@"Nobv
HTTP OK: HTTP/1.1 200 OK - 11413 bytes in 0.017 second response time |time=0.017223s;5.000000;10.000000;0.000000 size=11413B;;;0
Code: Select all
define service{
use local-service
host_name subs
service_description mebp
servicegroups OD
check_command check_nrpe!check_http!' -H mb.com -w 5 -c 10 -p 8980 -u /mb/ai/branch/all -a mba:785\!"@"Nobv'
}
Re: How can use complex password in check_http for url
You're running check_http directly on the nagios server, but the command is running check_http via nrpe on the http server. These aren't the same. Try getting rid of the check_nrpe part in the command. This was suggested several posts back.
Last edited by kg2857 on Tue Jul 09, 2024 1:25 am, edited 1 time in total.
Re: How can use complex password in check_http for url
Would you please help me how can correct it ?
Re: How can use complex password in check_http for url
Edit the service in CCM, change the command from nrpe to http, and change the arguments as needed.
Re: How can use complex password in check_http for url
I changed it such as follow
Is that correct ?
Code: Select all
define service{
use local-service
host_name subs
service_description mebp
servicegroups OD
check_command check_http!' -H mb.com -w 5 -c 10 -p 8980 -u /mb/ai/branch/all -a mba:785\!"@"Nobv'
}
Re: How can use complex password in check_http for url
What happens when it runs?
Re: How can use complex password in check_http for url
It is showing
HTTP WARNING: HTTP/1.1 400 Bad Request - 309 bytes in 0.001 second response time
Performance Data: time=0.000723s;;;0.000000 size=309B;;;0
Current Attempt: 4/4 (HARD state)
but when run it manually from nagios server shows :
HTTP WARNING: HTTP/1.1 400 Bad Request - 309 bytes in 0.001 second response time
Performance Data: time=0.000723s;;;0.000000 size=309B;;;0
Current Attempt: 4/4 (HARD state)
but when run it manually from nagios server shows :
Code: Select all
HTTP OK: HTTP/1.1 200 OK - 11413 bytes in 0.010 second response time |time=0.009974s;5.000000;10.000000;0.000000 size=11413B;;;0