Need help setting up alert

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.
Locked
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Need help setting up alert

Post by sheetzdw »

I am trying to setup an alert for the first time on an existing server.

I want to start from scratch and build an accurate alert for our main website

I need to do more than ping , I need to login and verify proper page is returned

may also need to verify SQL services are running on backend server

so where do I begin?
I see service templates and plug-ins already there that may be useful but would like help thinking this through to get the best plug-ins and setup possible so I understand the whole alert process


Thanks in advance... I appreciate all you guys being patient with such a noob

:mrgreen:
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Need help setting up alert

Post by tmcdonald »

The auto login is going to be somewhat tricky depending on how you actually log in. Is it a single page or a multi-step process? Is there a redirect after the login? Is there a "success" string you could use to verify you have logged in? Webinject is probably going to be needed for anything complicated, but for simple POST/GET-based login you can probably get check_http to do it.

As for the backend SQL, is it reachable by Nagios?
Former Nagios employee
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Re: Need help setting up alert

Post by sheetzdw »

Nagios can reach the SQL, there is an alert already setup for SQL on other servers

as far as the logon part I think we get a single logon page and it responds with a page containing certain content string if ok and different string if failed, so should be basic


actually an error brings up a message box

Code: Select all

     <div id="content-header">  
           <div id="content-info">
                          <div class="messages error">
Unable to verify your username or password.  For questions please contact......


success page includes Text: Do My Work (New)
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Need help setting up alert

Post by sreinhardt »

Well if it is using basic authentication, check_http should allow you to provide login credentials, and do a sting check for the successful return. If it does not match the string it will return critical. As for sql checks, you could replicate what you have on other machines or take a look at exchange.nagios.org and see what other checks you might want to use.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Re: Need help setting up alert

Post by sheetzdw »

great now what I need is the raw steps to set up an alert...

example:

edit ???.conf to create service
edit ??? to add host to host list
edit ??? to create an alert with x host and Y service
update running config
restart services


Is there a specific order to setup alerts?
any good docs on how to understand this better? I will search for sticky posts but if you have any good links it will be appreciated...
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Need help setting up alert

Post by slansing »

I'd have a look at the "How to Monitor" sections from the below URL:

http://nagios.sourceforge.net/docs/3_0/toc.html

The object definitions page will also show you what each configuration definition will do:

http://nagios.sourceforge.net/docs/3_0/ ... tions.html

Though it should be covered in the aformentioned links, be sure to verify your configs before restarting nagios:

Centos/Rhel:

http://nagios.sourceforge.net/docs/3_0/ ... onfig.html
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Re: Need help setting up alert

Post by sheetzdw »

muchas gracias !
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Need help setting up alert

Post by slansing »

Are we good to close this now? Or do you want to keep it open for alert based questions?
sheetzdw
Posts: 44
Joined: Tue Feb 11, 2014 10:34 am

Re: Need help setting up alert

Post by sheetzdw »

close for now, I need to read the documentation and give it a shot. I can open a new one if needed, thanks for all your help!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Need help setting up alert

Post by slansing »

Sure, closing it up.
Locked