LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-29-2010, 09:22 AM   #1
s0tGaL
LQ Newbie
 
Registered: Jul 2010
Posts: 13

Rep: Reputation: 0
questions to ask regarding nagios


Hello everyone.

I have a few questions to ask, so please pardon me

1) How to check for https in commands config file for Nagios? I only know how to check for http, not sure for https.

2) The log file in Nagios, is it possible to extend Nagios's plugins (or are there already have plugins existed) so that we could actually make use of the log file to check for status of each and every services in different hosts, instead of looking through the log file manually which can be very time-consuming if the list is very long.


Very sorry if the questions posted are stupid, i am a new Nagios user so wanting to know more.

[FYI: i'm using ubuntu to install Nagios]

Thank you and have a nice day.
 
Old 07-29-2010, 10:48 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Quote:
1) How to check for https in commands config file for Nagios? I only know how to check for http, not sure for https.
user port number with check_http

/usr/local/nagios/libexec/check_http -H ipaddress -p 443


Quote:
2) The log file in Nagios, is it possible to extend Nagios's plugins (or are there already have plugins existed) so that we could actually make use of the log file to check for status of each and every services in different hosts, instead of looking through the log file manually which can be very time-consuming if the list is very long.
sorry but I am not understand you question.
 
Old 07-29-2010, 10:58 AM   #3
s0tGaL
LQ Newbie
 
Registered: Jul 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sem007 View Post
user port number with check_http

/usr/local/nagios/libexec/check_http -H ipaddress -p 443
Oh i see. thanks =)


Quote:
Originally Posted by sem007 View Post
sorry but I am not understand you question.
What i mean is, you know in Nagios there is a log file right? So i want to know if currently there is any Nagios plugins that enable one to actually 'read' the log file instead of looking through the log file manually. Because in the log file there are a lot of service status for different servers that we are monitoring, so it will be good if there is any Nagios plugins that i could make use of to read the log file.
 
Old 07-29-2010, 11:50 AM   #4
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Quote:
Originally Posted by s0tGaL View Post
Oh i see. thanks =)




What i mean is, you know in Nagios there is a log file right? So i want to know if currently there is any Nagios plugins that enable one to actually 'read' the log file instead of looking through the log file manually. Because in the log file there are a lot of service status for different servers that we are monitoring, so it will be good if there is any Nagios plugins that i could make use of to read the log file.
You really not require to monitor log file. because nagios have web page and you can monitor hosts and services status through that.

web page display same status as log file so you really not require the same.

HTH
 
Old 07-29-2010, 08:35 PM   #5
s0tGaL
LQ Newbie
 
Registered: Jul 2010
Posts: 13

Original Poster
Rep: Reputation: 0
I do know about that, but i'm required to monitor log file for a purpose. That's why i'm asking on this
 
Old 07-29-2010, 09:25 PM   #6
s0tGaL
LQ Newbie
 
Registered: Jul 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Hey sem007,

just to confirm, is this correct?:

Code:
define command{
        command_name    check_https
        command_line    $USER1$/check_https -I $HOSTADDRESS$ $ARG1$ -p 443
        }
thanks again.
 
Old 07-30-2010, 04:16 AM   #7
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Do not assign -p in commnads.cfg file
Code:
define command{
        command_name    check_https
        command_line    $USER1$/check_https -I $HOSTADDRESS$ $ARG1$
        }
define port in host's service file
exa
Code:
check_command                   check_http!443
 
Old 07-30-2010, 04:33 AM   #8
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
if you compile nagios-plugin with --with-openssl option then you can verify ssl connection of http server and you can create new command entry for HTTPS like


Code:
# 'check_https' command definition
define command{
        command_name    check_https
        command_line    $USER1$/check_http --ssl -H $HOSTADDRESS$
        }
I hope this will help you..
 
Old 07-30-2010, 05:23 AM   #9
s0tGaL
LQ Newbie
 
Registered: Jul 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sem007 View Post
if you compile nagios-plugin with --with-openssl option then you can verify ssl connection of http server and you can create new command entry for HTTPS like


Code:
# 'check_https' command definition
define command{
        command_name    check_https
        command_line    $USER1$/check_http --ssl -H $HOSTADDRESS$
        }
I hope this will help you..
i don't really understand this part sorry.

And i changed according in windows.cfg:

Code:
define service{
        use                     generic-service
        host_name               remotehost
        service_description     HTTPS
        check_command           check_http!443
       }
right? just want to confirm (:

for some windows servers that i'm monitoring, i got 'Connection refused' and 'CRITICAL - Socket timeout after 10 seconds' Hmm.

i did open port 443 in windows firewall to allow HTTPS, maybe why it still can't connect.

Last edited by s0tGaL; 07-30-2010 at 05:28 AM.
 
Old 07-30-2010, 05:39 AM   #10
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Quote:

Quote:
Originally Posted by sem007 View Post
if you compile nagios-plugin with --with-openssl option then you can verify ssl connection of http server and you can create new command entry for HTTPS like


Code:

# 'check_https' command definition
define command{
command_name check_https
command_line $USER1$/check_http --ssl -H $HOSTADDRESS$
}

I hope this will help you..
i don't really understand this part sorry.
--ssl or -S option will Connect via SSL. Port defaults to 443
for that you have to compile nagios-plugin with --with-openssl option.

check_http --help to verify options.

read nagios-user mailing list
 
Old 07-30-2010, 07:22 AM   #11
s0tGaL
LQ Newbie
 
Registered: Jul 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Oh okay. So for HTTPS i have to connect via SSL first?

so i have to write this for commands:

Code:
# 'check_https' command definition
define command{
        command_name    check_https
        command_line    $USER1$/check_http --ssl -H $HOSTADDRESS$
        }
instead of this which i wrote earlier:

Code:
define command{
        command_name    check_https
        command_line    $USER1$/check_https -I $HOSTADDRESS$ $ARG1$
        }
thanks again
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Nagios and Oreon (Nagios web front end) installation and Configuration LXer Syndicated Linux News 1 05-31-2016 08:26 AM
Nagios 3.1.2 + RHEL 5.3 You don't have permission to access /nagios/ on this server psix Linux - Server 13 08-04-2015 03:25 AM
cannot find Nagios web interface (Nagios 3.2.0) and O/S = Fedora 10 gutiojj Linux - Newbie 7 02-04-2010 09:55 AM
Nagios Daemon, PID not found but rc.nagios runs agentc0re Slackware 1 07-03-2007 03:47 PM
LXer: Nagios 2.5 and Oreon 1.3 (Nagios web front end) installation with screenshots LXer Syndicated Linux News 0 08-11-2006 06:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration