Re: [Nagios-users] How to get reboot messages
You could also (if it's linux) just put a simple mail command with message in /etc/rc.local which executes after system boot and init. -Don On Thu, 2007-11-29 at 11:59 -0600, chris serafin wrote: > I have a bunch of devices which alert me fine up/down, but I'm looking > to find how to get messages when they reboot. Solarwinds does this for > me now, but I'm trying to move off this solution, but my boss want > reboot messages as well as up/downs for the devices... > > Any ideas? > > Chris Serafin > [EMAIL PROTECTED] > - > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > ___ Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include > Nagios version, plugin version (-v) and OS when reporting any issue. ::: > Messages without supporting info will risk being sent to /dev/null - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Centralizing NRPE Configuration
This was a learning curve for me but once I got it up and going using Puppet to manage configs enterprise-wide is making things easier: http://reductivelabs.com/trac/puppet Not that this will be what you are looking for, but it will manage configs globally and with invidual nodes defined. It uses cfengine as it's backend. Good stuff, but is a bit of learning curve. -Donnell Lewis On Wed, 2007-11-28 at 09:07 -0500, Cipriani, Robert C wrote: > True, the nrpe config will be generic, and will only have to push nrpe.cfg > when I add new commands. I just wanted to know what tools were out there, in > case things get more complicated in the future. I have a monitored box > configured the way I want it, I will probably just tar /usr/local/nagios, > /usr/lib/nrpe, etc. and make a package to install on other servers that > appends a line to /etc/services and copies the nrpe file into /etc/xinetd.d. > > > > Robert C. Cipriani > Senior Network Administrator > Tampa Bay Division IT > Bright House Networks > W: (727) 329-2000 x74264 > M: (727) 365-1231 > > > > > > -Original Message- > From: Hari Sekhon [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 28, 2007 8:48 AM > To: Cipriani, Robert C > Cc: 'nagios-users@lists.sourceforge.net' > Subject: Re: [Nagios-users] Centralizing NRPE Configuration > > Cipriani, Robert C wrote: > > I'll probably need something a bit more sophisticated than a bash script. I > > like the idea of being able to say "add line x to file y if line x doesn't > > yet exist". > > > You can do that in Bash, in fact I do it for deployment to make sure > nrpe is in /etc/services. > > Why not just have one global nrpe config that you have on all hosts though? > > This is way easier to manage and maintain. You just make up different > check command names for very specific things. > This also simplifies things incredibly and means you could never lose > your config, unless all your nrpe holding servers burned down along with > your svn server and all your backups. > > > -h > > -- > Hari Sekhon > > CONFIDENTIALITY NOTICE: This e-mail may contain information that is > privileged, confidential or otherwise protected from disclosure. If you are > not the intended recipient of this e-mail, please notify the sender > immediately by return e-mail, purge it and do not disseminate or copy it. > > - > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > ___ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Monitoring Nagios
Hey Jim, I use Monit which will monitor services and makes sure they stay running, there are alot of options and I have it making sure ssh, nagios and HTTP are running on the nagios box. Monit runs via the inittab and if it dies for any reason gets respawned using init and it has notifications it can send out about specific things. You can have it notify just for about anything, maybe this will help you out. http://www.tildeslash.com/monit/ -Donnell Lewis On Wed, 2007-11-28 at 14:52 +0100, Mohr James wrote: > Hi All! > > We had a problem the other day where the nagios process died and no one > noticed it for over 30 minutes. Therefore, I was thinking about ways to > monitor Nagios itself. One simply way would be a cronjob that checks if > the nagios process is running and then uses yaps or something to send an > SMS. But what about cases where the nagios process is running, but for > whatever reason the messages are not being processed. > > I was thinking about setting up a service that is triggered by a cronjob > and then sends a notification. This notification writes a flag file and > every X minutes a cron job checks the age of the flag file. If the flag > file is too old, it sends an SMS via yaps. > > Rather than re-invent the wheel, I was wondering if other people had > already implemented something similar. > > Regards, > > Jim Mohr > > - > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > ___ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] On-Call Rotation
Likewise here, we have a qmail server and I just setup a adminonduty contactgroup and defined a timeperiod for adminonduty contacts and then wrote a simple bash script that looks for the current adminonduty in the adminonduty.cfg file that holds the group definition and according to what the current one is changes that to the next in the list and reloads nagios, then it logs in to the mailserver and sets the adminonduty forwarder to the current email addy of the contact. -Don On Mon, 2007-10-15 at 10:30 -0500, Steve T wrote: > I just created a contactgroup for each of us on call and manually > changed the notification every week. Nothing fancy, but we swapped > our on calls often enough that it was easier for us to just pencil > ourselves in. > > On 10/15/07, Nathan Blackham <[EMAIL PROTECTED]> wrote: > What do other people user to rotate who gets paged at night. > We currently have 4 Admins that rotate on a weekly basis > (Monday-Monday). Currently we are all getting paged all the > time. Is there a solution out there that we can setup a > On-Call person or pointer where it will switch between who is > currently on-call? > > Nathan > > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> > http://get.splunk.com/ > ___ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS > when reporting any issue. > ::: Messages without supporting info will risk being sent > to /dev/null > > > > -- > "In a time of universal deceit, telling the truth is a revolutionary > act!" > -- George Orwell (Eric Arthur Blair) > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > ___ Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include > Nagios version, plugin version (-v) and OS when reporting any issue. ::: > Messages without supporting info will risk being sent to /dev/null - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] separate webfront
Or you could use the distributed monitoring method: have a master nagios server (running the web front-end) running at one locationa and then have another (or multiple) nagios daemons running on the other boxes that actually check the local machines at that colo and send passive check results via nsca to the master hosting the frontend. -Don On Mon, 2007-09-10 at 17:24 -0400, Cassandra Pugh wrote: > Hugo, perhaps you can elaborate? Do you know how to pull the web page info > out and put it on another server? > > I am not sure if I want to go the NFS route, as we recently got hacked > through NFS vulnerabilities. > > However, it has been requested that this Nagios page be "public". I have set > it up on my box as an internal website, so I know how to do that much... it's > just having half of nagios on our "public" web server that has me scratching > my head. > > Any further advice? > > -- > Cassandra > (609) 243-2413 > > > "From a little spark may burst a mighty flame." > > -- > > Message: 5 > Date: Fri, 7 Sep 2007 17:37:06 -0500 > From: "Marc Powell" <[EMAIL PROTECTED]> > Subject: Re: [Nagios-users] separate webfront > To: > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="US-ASCII" > > > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:nagios-users- > > [EMAIL PROTECTED] On Behalf Of Cassandra Pugh > > Sent: Friday, September 07, 2007 3:32 PM > > To: nagios-users@lists.sourceforge.net > > Subject: [Nagios-users] separate webfront > > > > I would like to know if anyone knows if the nagios program (and all it > > collects and monitors) and the webfront can be hosted on different > > computers? > > I do not want to make the server that nagios is hosted on a webserver, > and > > also do not want to bog down the webserver with the nagios processes. > > > > Does anyone know what I would need to do to accomplish this > separation? > > I have been successful in NFS mounting the nagios home directory from > another machine and using the CGI's from there. The only drawback is > that you will not be able to issue commands from the web interface at > all. NFS doesn't support named pipes. > > -- > Marc > > > > > > > > -- > > Message: 7 > Date: Sat, 8 Sep 2007 09:29:32 +0200 (CEST) > From: Hugo van der Kooij <[EMAIL PROTECTED]> > Subject: Re: [Nagios-users] separate webfront > To: Nagios Users mailinglist > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Fri, 7 Sep 2007, Cassandra Pugh wrote: > > > I would like to know if anyone knows if the nagios program (and all it > > collects and monitors) and the webfront can be hosted on different > computers? > > I do not want to make the server that nagios is hosted on a webserver, and > > also do not want to bog down the webserver with the nagios processes. > > Apache is not that hard if you tune down the defaults. I think you will > find the drawbacks of seperation harder then it needs to be. > > If yyou do not wish to make it public you can always make the other apache > server a front for this webserver. I do this for various aplications. > > Hugo. > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Hosts/service Acknowledgement comment staleness?
Hey All, I am using version 2.9 currently and am noticing that when I ack a host/service and leave a comment and unchecked the persistent option that when the service or host changes states the acknowledgment comment is not being removed. I know that before I upgraded (was using 2.5) when I left a comment on acknowledging an alert and unchecked the "persistent" option the comment would automatically be removed when the host/service changed states. I'm not referring to the sticky acknowledgment which I know keeps the acks there across program restarts, I'm referring to the 3rd box under send notifications for the persistent option. Anyone else experience this behavior ? Donnell Lewis "You can judge the character of others by how they treat those they think can do nothing for them..."-Malcom Forbes - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] check_dns_random
On Thu, 2006-11-16 at 12:20 -0500, Ugo Bellavance wrote: > # 'check_dns1_random' command definition > define command{ > command_namecheck_dns1_random > command_line$USER1$/contrib/check_dns_random.pl 127.0.0.1 > } Just out of curiousity have you tried: # 'check_dns1_random' command definition define command{ command_namecheck_dns1_random command_line$USER1$/contrib/check_dns_random.pl "127.0.0.1" } and make sure the perms of course are correct on the plugin check. Don't know if that will help but sometimes I have had to use "" for things on the command line being executed. -Don Lewis - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Customized map for customers
On Thu, 2006-11-16 at 11:54 +0200, Varaillon Jean Cristophe wrote: > Hi, > > We are an ISP and we have a lot of customers set-up with VRF. > > Using Nagios, would I be able to provide a customized map to my customer > where the would see: > > Their_Remote_Office_Router---Their_Central_Office_Rou > ter > Yes, this can be achieved using the web authentication that you setup to login to nagios. You would make your .htaccess or auth schema user the same as the user you put them into contacts.cfg as. Then you would have to create a group just for them in contactgroup.cfg. After that you would then add their contactgroup to the host/services for which they have with you. The ISP cloud will basically show as the central nagios host that's doing the checks, unless you add a host and just name it that for viewing purposes on the map. Then, after you have added them to the auth files, contacts.cfg, contactgroups.cfg and put their group name into the hosts/services they are to see you would also need to make sure that in the hosts/services definitions that you are using the 'parent ' option so that things will fall correctly on the map. Hope that helps somewhat, didn't describe as best as I probably could. -Don Lewis > Can Nagios provide a web access where my customer would see: > - A networking diagram CE1--CE2 > - The traffic rate going between the two Customer Equipment routers. > > Thank you for your time! > > Christophe > > Disclaimer > The information in this e-mail and any attachments is confidential. It is > intended solely for the attention and use of the named addressee(s). If you > are not the intended recipient, or person responsible for delivering this > information to the intended recipient, please notify the sender immediately. > Unless you are the intended recipient or his/her representative you are not > authorized to, and must not, read, copy, distribute, use or retain this > message or any part of it. E-mail transmission cannot be guaranteed to be > secure or error-free as information could be intercepted, corrupted, lost, > destroyed, arrive late or incomplete, or contain viruses. > > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] SOLVED: RE: Plugin error: Remote cisco command via SSH notworking
Don't forget you may also want to post this on nagiosexchange.com as it's a great resource for Nagios related projects. Thx, -Don Lewis On Thu, 2006-11-16 at 17:13 +0100, Javier Castillo Alcibar wrote: > Hello, > > I think I solved the problem. Notice this command in my perl script: > "$ENV{'HOME'} = '/var/lib/nagios';" > > Nagios process was executing the plugin with HOME env varible set to "/root" > ¿?¿?. This made ssh fails when trying to read $HOME/.ssh/config files > (root folder is not readable by other users) > > Finally, my contribution to nagios world: check_cisco_ping_ssh (ping from > cisco routers, using ssh): > > #!/usr/bin/perl > # Net::SSH de http://www.stupidfool.org/perl/net-ssh/ > # > # Use: usr/local/sbin/check_cisco_ping_ssh > > # > use strict; > > use Net::SSH::Perl; > > $ENV{'HOME'} = '/var/lib/nagios'; > > my $router=$ARGV[0]; > my $port=$ARGV[1]; > > my $user=$ARGV[2]; > my $pass=$ARGV[3]; > > my $ip=$ARGV[4]; > > my $warn=$ARGV[5]; > my $crit=$ARGV[6]; > > > > my $sesion_ssh = Net::SSH::Perl->new($router, protocol=>1, cipher=>'DES', > port=>$port, debug=> 'false'); > $sesion_ssh->login($user, $pass); > > my $comand="ping $ip"; > > my($output, $output_error, $value_exit) = $sesion_ssh->cmd($command); > > $output =~ /Success rate is (\d*) (.*)/; > > my $rate=$1; > > if ( $rate <= $crit ) { > print "PROBLEM: Rate=$rate%\n"; > exit 2; > } > > if ( $rate <= $warn ) { > print "WARNING: Rate=$rate%\n"; > exit 1; > } > > if ( $rate <= 100 ) { > print "OK: Rate=$rate%\n"; > exit 0; > } > > exit 3; > > > > Enjoy it. > Regards > > Javier Castillo Alcíbar (2404) > Alhambra Eidos. > +34 91 787 23 00 [EMAIL PROTECTED] > > > > > > > > -Mensaje original- > De: Andreas Ericsson [mailto:[EMAIL PROTECTED] > Enviado el: jueves, 16 de noviembre de 2006 16:59 > Para: Javier Castillo Alcibar > CC: nagios-users@lists.sourceforge.net > Asunto: Re: [Nagios-users] Plugin error: Remote cisco command via SSH > notworking > > Javier Castillo Alcibar wrote: > > > > Hello all, > > > > I have some cisco routers that can only be managed using SSH. I wrote > > an script, to do remotely some PING's from these routers, integrated > > in nagios. > > > > My problem is very strange: > > - if a execute this script from the command line by myself, it works > > as expected. > > - if nagios process executes the script, it does not work. It looks > > like ssh process didn't return anything > > > > I think it's a problem related with ttys.but I'm not sure. > > > > This is my (perl) script: > > > > #!/usr/bin/perl > > # > > # Uso: usr/local/sbin/check_cisco_ping_ssh > ># use Net::SSH::Perl; > > > > $router=$ARGV[0]; > > $port=$ARGV[1]; > > $user=$ARGV[2]; > > $pass=$ARGV[3]; > > $ip=$ARGV[4]; > > $warn=$ARGV[5]; > > $crit=$ARGV[6]; > > > > my $sesion_ssh = Net::SSH::Perl->new($router, protocol=>1, > > cipher=>'DES', port=>$port); $sesion_ssh->login($user, $pass); > > > > $command="ping $ip"; > > > > my($output, $output_error, $val_exit) = $sesion_ssh->cmd($command); > > > > $output =~ /Success rate is (\d*) (.*)/; $rate=$1; > > > > if ( $rate <= $crit ) { > > print "PROBLEM: PING Rate=$rate%\n"; > > exit 2; > > } > > if ( $rate <= $warn ) { > > print "WARNING: PING Rate=$rate%\n"; > > exit 1; > > } > > if ( $rate <= 100 ) { > > print "OK: PING Rate=$rate%\n"; > > exit 0; > > } > > exit 3; > > > > > > Any help is welcome!!. > > > > Have you compiled nagios with embedded perl support? If so, use /usr/bin/perl > /path/to/your/script.pl > > instead of just > > /path/to/your/script.pl > > in the command definition. > > Other than that, make sure that the nagios-user has access to execute the > script and try it from the command-line *as the nagios user*. If that works, > you've made some mistake in your configuration. > > -- > Andreas Ericsson [EMAIL PROTECTED] > OP5 AB www.op5.se > Tel: +46 8-230225 Fax: +46 8-230231 > > > Alhambra-Eidos ha cambiado su dominio de correo electrónico. Por favor revise > sus contactos, y proceda a actualizar nuestras direcciones a @a-e.es. > > > > Muchas gracias. > Alhambra-Eidos. We solve IT, we solve it > > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://l
Re: [Nagios-users] nagios startup options
I run it as a user allowed to startup nagios process and have it run as a cronjob. Could also dump as a cron in like /etc/cron.d*, for me I have the nagios user able to startup the nagios process using a sudo ability letting the nagios user just execute that command to startup the process via root. I have our checking on crontab like every 5 or 10 minutes, can't remember which. -Donnell Lewis On Tue, 2006-11-14 at 16:46 -0600, Brian Loe wrote: > On 11/14/06, Donnell Lewis <[EMAIL PROTECTED]> wrote: > > I always like using the nagios process check myself rather than checking > > for the ".pid" file as I have had nagios die off and the ps wasn't > > telling me anything, I use this which works pretty good for me, I also > > use this along with additonal and modified to check our nagios primary > > to make sure it's up and if not startup slave etc. > > > > Where do you run this from? Looks good... - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] nagios startup options
I always like using the nagios process check myself rather than checking for the ".pid" file as I have had nagios die off and the ps wasn't telling me anything, I use this which works pretty good for me, I also use this along with additonal and modified to check our nagios primary to make sure it's up and if not startup slave etc. Might want to give this a try, edit according to your install of course : #!/bin/bash plugindir="/usr/local/nagios/libexec" cmdstart='/sbin/service nagios start' #Check nagios with check_nagios plugin $plugindir/check_nagios -e 5 -F /usr/local/nagios/var/nagios.log -C /usr/local/nagios/bin/nagios if [ "${?}" != 0 ] ; then echo "CRITICAL:Nagios not found running..." $cmdstart else echo "OK:Nagios runnning..." fi exit -Donnell Lewis On Tue, 2006-11-14 at 22:29 +0100, Hugo van der Kooij wrote: > On Tue, 14 Nov 2006, Brian Loe wrote: > > > On 11/14/06, Hugo van der Kooij <[EMAIL PROTECTED]> wrote: > > > > > > > > > Sounds like a bad idea. If you make a typo in the config your system will > > > respawn itself a lot as it will start and die in quick succesion. > > > > > > A watchdog script can be smarter. And my nagios uptime is almost identical > > > to my OS uptime. (Which equals the amount of time it takes to run my > > > Sxxnagios script in rc3.d after boot up.) > > > > Do you have such a watchdog script you can share? :) > > Well. I do not have one because nagios is quite stable. But it might > contain a check like: > > ps ax|egrep "^`cat /var/run/nagios.pid`" > > And verify is still is the nagios process. > > Other check might work just as well. > > > Do you kick it off from an rc file as well? > > Sure. Multiple Centos 4 system all running nagios from DAG's rpm packages. > Everything except the actual nagios config files was a breeze to install. > > Hugo. > - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] nagios startup options
Well, This would solely depend on what distro you are running it on I would imagine. I run mine on redhat, so when I installed it it put the proper files in the /etc/rc.d directories and /etc/init.d and all I had to do was chkconfig --add nagios. Not sure what distro you are using but you could add it to your init/rc directories the old POSIX way if you aren't using a package manager or service control files, otherwise you could start it up in /etc/rc.local file. As for making sure to restart if it dies, well, that could be done by writing a little bash script that check to see if the nagios process itself is running and if not start it up through the service control or command line string. You really needed to provide a little more info like what distro etc you are running, but that's the gist of it. -Donnell Lewis On Tue, 2006-11-14 at 13:55 -0600, Brian Loe wrote: > What is the best, safest way to have Nagios start at boot? It would > also need to respawn - if for some reason it was killed? > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] How can you set service check execution time? (aside from passive cron)
Should be able to create another timzperiod config in the timeperiods.cfg I would imagine and in the service definition use the check_period Could have additional timeperiod definition for a certain time each day which would execcute the service checks JUST between those times. Think I am on the right track with that. -Don Lewis On Mon, 2006-11-13 at 10:11 +, Peter Farrell wrote: > How can you set service check execution time? (aside from passive cron) > > I have loads of log checks that need to be checked after 8am and only > once each day. > As services - they fire at seemingly random times - 2.30am 4am, 6am, etc. > > I have a many paged Nagios cron already that runs various passive > checks - and don't really have an issue w/ adding the log checks to > that cronttab - just wanted to know if there was a way to set a time > when a service check is fired off. > > I know it goes against the grain (in that I only want 1 check / 24H) > of Nagios as a continuous monitoring application - but was just > curious if anyone has the same issues. > > -Peter > > - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Running check_nagios by ssh
Here is a script I wrote for checking that the master is running or not and it will ENABLE/DISABLE the service checks and notifications accordingly on the slave depending on it's check results of the master. You will need to edit the variables accordingly and remove the rsync stuff as I used it to automatically turn the rsync cron ON/OFF. I run this on a cron. The use of sudo in this script is because I am running it as the nagios user and it needed it for adjusting the rsync cron, but you can remove the rsync stuff and add your own if you want it to do any additional functions beyond ENABLING/DISABLING service checks and notifs on the slave. Please keep in mind this script is rudimentary and could be streamlined alot, I just haven't gotten around to it.. -Don check_nagios_primary.sh contents: #!/bin/bash # Author: Donnell C. Lewis | 2005-09-14 |NOTE:This script was written to work with Nagios 2.x and up. # This script is covered under the GPL and can be freely distributed, re-distributed and edited, sliced # diced and throw in the fire so long as you leave the original $AUTHOR credits in place. # Props go out to Ethan Galstad who made the awesome software for which this script was written to # work with. # What is is: This script was written to be a semi-logical automatic control interface between the # primary Nagios host and the slave Nagios host, and should be set to run on a crontab. It includes all # the functions that it requires to login/reach the primary Nagios to make sure it's running it's Nagios # processes. If this script cannot ssh to the primary or should it not be able to locate a running # Nagios process on the primary it will send commands to the nagios.cmd file on the slave that will # enable "service checks" and "notifications" and disable the companion rsync script. Once this # script can once again reach the primary and finds running processes it will send commands to # nagios.cmd that will disable "service checks" and "notifications" and re-enable the companion # rsync script. # Here we set some PATH's and environment variables for script execution PATH=$PATH:$HOME/bin:/usr:/bin:/sbin:/usr/bin:/usr/sbin: export PATH unset USERNAME # Here we check if this script is already running and if so we die ! if [ -e "check_nagios_primary.lock" ]; then echo "check_nagios_primary.sh already running..exiting!" echo "check_nagios_primary.sh already running..exiting!" >> check_nagios_primary.log exit fi # Write a command to the Nagios command file to cause # it to process a service check result touch check_nagios_primary.lock echocmd="/bin/echo" CommandFile="/usr/local/nagios/var/rw/nagios.cmd" # get the current date/time in seconds since UNIX epoch datetimestamp=$(date +%s) datetime=$(date) # create the command line to add to the command file cmdline="[$datetimestamp]" SVCUP="STOP_EXECUTING_SVC_CHECKS;" SVCDOWN="START_EXECUTING_SVC_CHECKS;" NOTIFON="ENABLE_NOTIFICATIONS;" NOTIFOFF="DISABLE_NOTIFICATIONS;" PRIMARY="89.149.155.19" #Check nagios with check_nagios plugin /usr/local/nagios/libexec/check_by_ssh -t 90 -H $PRIMARY -C "./check_nagios -e 5 -F /usr/local/nagios/var/nagios.log -C /usr/local/nagios/bin/nagios >> /dev/null" if [ "${?}" != 0 ] ; then echo "$datetime CRITICAL:Nagios not running, enabling service checks and notifications !" touch /usr/local/nagios/var/check_nagios_primary.log echo "$datetime CRITICAL:Nagios not running, enabling service checks and notifications !" >> check_nagios_primary.log $echocmd $cmdline $SVCDOWN >> $CommandFile $echocmd $cmdline $NOTIFON >> $CommandFile sudo crontab -u rsync -r else echo "$datetime OK:Nagios running fine mate, disabling service checks and notifications !" touch /usr/local/nagios/var/check_nagios_primary.log echo "$datetime OK:Nagios running fine mate, disabling service checks and notifications !" >> check_nagios_primary.log $echocmd $cmdline $SVCUP >> $CommandFile $echocmd $cmdline $NOTIFOFF >> $CommandFile sudo crontab -u rsync -r echo "*/5 * * * * /home/rsync/rsync.pull-nagios.sh >/dev/null 2>&1" > cron.tmp sudo crontab -u rsync cron.tmp rm -rf cron.tmp fi rm -rf check_nagios_primary.lock exit On Mon, 2006-10-30 at 18:52 -0500, Lehman, John wrote: > Hello, > I am trying to run the check_nagios command from one machine to another. > (slave to master) > > I can run the following from the command prompt on the "slave" machine: > > Note: the master I am checking is 10.130.4.80 > > /usr/lib/nagios/plugins/check_by_ssh -H 10.130.4.80 -l smadmin-sec -i > home/smadmin-sec/.ssh/id_dsa -C "/usr/lib/nagios/plugins/check_nagios > /var/log/nagios/status.log 5 'nagios'" > > > I get the following as a response: > > Nagios ok: located 1 process, status log updated 3 seconds ago > > > > My question is, can I use the "response" to determine whether the master > is up and if not I want the slave to take over? > > I thought this might be a simple and easy way to set up failover > > Thanks. > > > > ---
Re: [Nagios-users] Viewing a subset of systems checked by Nagios
Oh, and a side note, make sure of course that you add the same username to the web auth that you use for the contact in contact.cfg. -Don Lewis On Wed, 2006-10-25 at 14:30 +0100, Wheeler, JF (Jonathan) wrote: > I have a Nagios installation with ~700 hosts and ~11000 services. What > we would like to do is to allow some users to view (via the web > interface) only a subset of the systems being monitored; in the current > instance this is just one host, but there could be other instances > requiring a number of hosts . Is this possible ? I suspect not, but > any comments would be useful. I am aware of the possibility that most > users who have access to the web view should not have the ability to run > commands. > > Jonathan Wheeler > e-Science Centre > Rutherford Appleton Laboratory > > - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Viewing a subset of systems checked by Nagios
Yes this is possible. You would need to add the client(person) to the contacts.cfg file and then either to an existing contact group in contactgroups.cfg or make a new contactgroup specifically for that client. Unless given ALL privs in cgi.cfg every each user that has been added to the authentication mechanism will only be allowed to see hosts/services for which they are contacts for. So remember to add the contactgroup you create to the host & the services for that host ( in services.cfg ) and they will then be able to see the host and associated services for it. By adding this new contact and contactgroup you can even specifically send them alerts of their own at intervals they want them at, and when they log in through the web interface they will only be able to see the hosts/services you have given them access to, and when they look at the status map they will only see the hosts/services you have assigned them, the rest will be ? marks on the map, everywhere else they will just see theirs. Hope that helps. -Don Lewis On Wed, 2006-10-25 at 14:30 +0100, Wheeler, JF (Jonathan) wrote: > I have a Nagios installation with ~700 hosts and ~11000 services. What > we would like to do is to allow some users to view (via the web > interface) only a subset of the systems being monitored; in the current > instance this is just one host, but there could be other instances > requiring a number of hosts . Is this possible ? I suspect not, but > any comments would be useful. I am aware of the possibility that most > users who have access to the web view should not have the ability to run > commands. > > Jonathan Wheeler > e-Science Centre > Rutherford Appleton Laboratory > > - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Bizarre Behavior: Nagios Runs of Redhat Linux, but not Fedora
Well, as for permissions, if I'm not mistaken in the docs somewhere it states to make sure you have SELinux disabled. So you also may want to make sure that is the case on your box as well. -DL On Fri, 2006-09-15 at 10:50 -0700, Vern Kyle wrote: > I doubt it's a permission issue. All files are owned by the nagios > user, and all permissions are readable by the webserver user. I > doubled checked this to make sure it is the case. I also tried making > all nagios config, plugins, etc readable/writable by user,group and > other just to test, still get the same error. > > > On 9/14/06, Elias Probst <[EMAIL PROTECTED]> wrote: > > Are your configuration files readable by the nagios-user? Check the > > permissions. > > > > Regards > > > > Elias P. > > > > - > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > ___ > > Nagios-users mailing list > > Nagios-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/nagios-users > > ::: Please include Nagios version, plugin version (-v) and OS when > > reporting any issue. > > ::: Messages without supporting info will risk being sent to /dev/null > > > > - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] SYN attacks from nagios
Did the 'ping' command check itself change from the 2 different versions ? Check in checkcommands.cfg, see if the command definition is the same between the two. -DL On Thu, 2006-09-14 at 17:07 +0100, [EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote on 14/09/2006 17:00:29: > > > Good morning, > > > > I have 2 nagios servers. One is running 1.2 and the other is running > > 2.5. Both are running in parallel while I migrate to the 2.5 machine. > > Our content switch is detecting that the 2.5 machine is SYN attacking > > hosts. Both servers have very similar monitoring sets and similar > > configurations. I have gone through the config and nothing stands > > out. Obviously, the 2.5 machine is pounding the servers more heavily > > but I can't figure out why. Below is my config. > > > > Good evening! > > > > What checks are you running against the server that is detecting the SYN > attacks? > > The config you posted is the general nagios config, we would need to see > the services.cfg portions for the affected host(s) > > Cheers > > > This message and any attachments (the "message") is > intended solely for the addressees and is confidential. > If you receive this message in error, please delete it and > immediately notify the sender. Any use not in accord with > its purpose, any dissemination or disclosure, either whole > or partial, is prohibited except formal approval. The internet > can not guarantee the integrity of this message. > BNP PARIBAS (and its subsidiaries) shall (will) not > therefore be liable for the message if modified. > > ** > > BNP Paribas Private Bank London Branch is authorised > by CECEI & AMF and is regulated by the Financial Services > Authority for the conduct of its investment business in > the United Kingdom. > > BNP Paribas Securities Services London Branch is authorised > by CECEI & AMF and is regulated by the Financial Services > Authority for the conduct of its investment business in > the United Kingdom. > > BNP Paribas Fund Services UK Limited is authorised and > regulated by the Financial Services Authority > > > - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null