Authorization not being passed in http check.
Posted: Wed Feb 08, 2017 2:57 pm
Hi Nagios!
We currently run both Tomcat 5.5 and 7.
For 5.5 one of the checks we run is this;
/usr/local/nagios/libexec/check_http -H $HOSTNAME$ -p 8080 -t 50 -a $USER6$ -u '/manager/html/list' -R 'tomcat'
For Tomcat 7 we want to run almost the exact same check;
/usr/local/nagios/libexec/check_http -H $HOSTNAME$ -p 8080 -t 50 -a $USER6$ -u /manager/status -R 'tomcat'
The one for Tomcat 5.5 returns a success and the one for Tomcat 7 returns a 401.
[nthaler@nagios-02 ~]$ /usr/local/nagios/libexec/check_http -H wa-server-prod-30 -p 8080 -t 50 -a user:pw -u '/manager/status' -R Tomcat
HTTP WARNING: HTTP/1.1 401 Unauthorized - 2971 bytes in 0.002 second response time |time=0.002126s;;;0.000000 size=2971B;;;0
We have tested through the web browser and the username and pw work manually. Any idea why it is failing with a 401?
We currently run both Tomcat 5.5 and 7.
For 5.5 one of the checks we run is this;
/usr/local/nagios/libexec/check_http -H $HOSTNAME$ -p 8080 -t 50 -a $USER6$ -u '/manager/html/list' -R 'tomcat'
For Tomcat 7 we want to run almost the exact same check;
/usr/local/nagios/libexec/check_http -H $HOSTNAME$ -p 8080 -t 50 -a $USER6$ -u /manager/status -R 'tomcat'
The one for Tomcat 5.5 returns a success and the one for Tomcat 7 returns a 401.
[nthaler@nagios-02 ~]$ /usr/local/nagios/libexec/check_http -H wa-server-prod-30 -p 8080 -t 50 -a user:pw -u '/manager/status' -R Tomcat
HTTP WARNING: HTTP/1.1 401 Unauthorized - 2971 bytes in 0.002 second response time |time=0.002126s;;;0.000000 size=2971B;;;0
We have tested through the web browser and the username and pw work manually. Any idea why it is failing with a 401?