I want to check the expiry date of the SSL certificate of the Apache web application.
Unfortunately $HOSTNAME$ has the value of <servername>.mgt.domain.name and to run my check I need <servername>.domain.name. I cannot really change this in my organization.
I nagios I can do this command on the nagios server, using ncpa and check_http to check the remote server:
Code: Select all
./check_ncpa.py -t secrettoken -H server1.mgt.domain.name -P 5693 -M 'plugins/check_http' -a '-I server1.domain.name -ssl -p443 -sni -C 60' Code: Select all
./check_ncpa.py -t secrettoken -H server1.mgt.domain.name -P 5693 -M 'plugins/check_http' -a '-I $(hostname -s).domain.name -ssl -p443 -sni -C 60'