Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
afigles
Posts: 19 Joined: Wed Sep 11, 2019 12:15 pm
Post
by afigles » Fri Sep 13, 2019 1:36 am
Hello,
Yes, I installed all the prerequisites from the web
https://support.nagios.com/kb/article.php?id=569 .
I have runned your last commands but I get the same error from Nagios console with -S option -> check_http: Invalid option - SSL is not available
Parameter -S is not exist in the command but --sni is valid.
root@rdxnagios:/usr/local/nagios/etc/objects# /root/nagios-plugins-release-2.2.1/plugins/check_http -H 172.22.93.35 -P 443 --sni -u /sctd/loginPage.do
HTTP OK: HTTP/1.1 200 OK - 63458 bytes in 0.060 second response time |time=0.060028s;;;0.000000 size=63458B;;;0
Change commands.cfg with --sni but the error in nagios web is CRITICAL - Socket timeout
other ideas??
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Fri Sep 13, 2019 6:38 am
When you are testing these, you are using the path
Code: Select all
/root/nagios-plugins-release-2.2.1/plugins/check_http
What is the path of $USER1$ that nagios is using?
Code: Select all
grep USER1 /usr/local/nagios/etc/cgi.cfg
afigles
Posts: 19 Joined: Wed Sep 11, 2019 12:15 pm
Post
by afigles » Fri Sep 13, 2019 7:31 am
grep command does not return anything.
root@rdxnagios:/usr/local/nagios/etc# grep USER1 /usr/local/nagios/etc/cgi.cfg
root@rdxnagios:/usr/local/nagios/etc#
I change the command in command.cfg but same result.
# 'check_http_url' command definition
define command{
command_name check_http_url
command_line /root/nagios-plugins-release-2.2.1/plugins/check_http -H $HOSTADDRESS$ -p $ARG1$ -u $ARG2$
}
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Fri Sep 13, 2019 8:22 am
Sorry, I had the file wrong
Code: Select all
grep USER1 /usr/local/nagios/etc/resources.cfg
My guess is they are in /usr/local/nagios/libexec
Can you run this and show the output
Code: Select all
/usr/local/nagios/libexec/check_http -h
afigles
Posts: 19 Joined: Wed Sep 11, 2019 12:15 pm
Post
by afigles » Mon Sep 16, 2019 3:32 am
Code: Select all
root@rdxnagios://usr/local/nagios/etc# /usr/local/nagios/libexec/check_http -h
check_http v2.2.1.git (nagios-plugins 2.2.1)
Copyright (c) 1999 Ethan Galstad <[email protected] >
Copyright (c) 1999-2014 Nagios Plugin Development Team
<[email protected] >
This plugin tests the HTTP service on the specified host. It can test
normal (http) and secure (https) servers, follow redirects, search for
strings and regular expressions, check connection times, and report on
certificate expiration times.
Usage:
check_http -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]
[-J <client certificate file>] [-K <private key>]
[-w <warn time>] [-c <critical time>] [-t <timeout>] [-L] [-E] [-a auth]
[-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]
[-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]
[-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]
[-A string] [-k string] [-S <version>] [--sni] [-C <warn_age>[,<crit_age>]]
[-T <content-type>] [-j method]
NOTE: One or both of -H and -I must be specified
Code: Select all
root@rdxnagios://usr/local/nagios/etc# grep USER1 resource.cfg
# Nagios supports up to 32 $USERx$ macros ($USER1$ through $USER32$)
# Sets $USER1$ to be the path to the plugins
$USER1$=/usr/local/nagios/libexec
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Mon Sep 16, 2019 6:53 am
So when nagios executes the checks it is using /usr/local/nagios/libexec/check_http but you have been testing from /usr/local/nagios/libexec/check_http
afigles
Posts: 19 Joined: Wed Sep 11, 2019 12:15 pm
Post
by afigles » Tue Sep 24, 2019 1:46 am
I compiled wirh ssl and check_http -S works now.
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Tue Sep 24, 2019 9:39 am
afigles wrote: I compiled wirh ssl and check_http -S works now.
Great!
Locking