[Nagios-users] RE: Nagios config parser in Perl

2006-05-30 Thread Stanley.Hopcroft
Dear Sir,

I am writing to thank you for your letter and say   

>Message: 13
>Date: Tue, 30 May 2006 16:47:02 +0200
>From: Marc Haber <[EMAIL PROTECTED]>
>To: nagios-users@lists.sourceforge.net
>Subject: [Nagios-users] Parsing a Nagios 2 configuration file from perl
>
>Hi,
>
>I'd like to have a list of all host_name directives in host 
>definitions in a nagios 2 template style configuration in a 
>perl script.
>
>Did anybody already write a nagios 2 configuration file parser in perl?
>

Yep. There's a (prob since I haven't used it) good one on CPAN in the
Nagios name space (search Nagios should find it) written by a Perl
luminary Al Tobey.

You need the Build module to get it installed.

There is also a rough-as-guts one that I use that is sometimes useful.
If you want to be the guinea pig ..


Here's an example of it in 'action'.


[EMAIL PROTECTED] sh1517]$ perl -MNagios::Config -e
'$x=Nagios::Config->new("/etc/nagios/nagios.cfg"); @x=$x->grep("hosts",
q[$host_name =~ /mt[ab]sw21/i]); $x->pprint("hosts", [EMAIL PROTECTED])'
define host{
   host_nameMTBSW210
   address  10.0.254.149
   alias14 MORT BUILDING
   contact_groups
datacomms-admins,premier_support_group
   notification_period  24x7
   parents  MTASW200,BRUSW200
   use  generic-host
   }

define host{
   host_nameMTASW210
   address  10.0.254.169
   alias16 MORT BUILDING
   contact_groups
datacomms-admins,premier_support_group
   notification_period  24x7
   parents  MTASW200,BRUSW200
   use  generic-host
   }

extracting stuff.

I actually use it (for some definition of 'use') for batch adds. But it
is rough ...

>Greetings
>Marc

caveat computer.

Yours sincerely.


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
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] check_mysql not using ~nagios/.my.cnf on ubuntu 6.0.6 with nagios 2.3.1

2006-05-30 Thread John Breen
I am using nagios 2.3.1 with nagios-plugins-plugins-1.4.3 on an Ubuntu 
6.06 server.


I am using check_mysql, compiled on this server against 
libmysqlclient15, to check the status of mysql on two other servers.


I have created a .my.cnf file in ~nagios, and when I run check_mysql -H 
 from the command line as the nagios user all goes well.  
However, when I automate this in my checkcommands.cfg, I get errors and 
nagios tells me the server is down.


~nagios/.my.cnf has looks like this:

[client]
password = ""

The block in checkcommands.cfg looks like this:

# check_mysql command definition.
define command{
  command_namecheck_mysql
  command_line$USER1$/check_mysql -H $HOSTADDRESS$
  }


When I run check_mysql from the commandline against the host, I get

[EMAIL PROTECTED]:~nagios/$ check_mysql -H mysql-server
Uptime: 426469  Threads: 2  Questions: 18075  Slow queries: 0  Opens: 0  
Flush tables: 1  Open tables: 64  Queries per second avg: 0.042


But when I do it automatically via checkcommands.cfg, i get

Access denied for user 'nagios'@'monitor-server.voipwa.net.au' (using 
password: NO)


If I add the -p  to the checkcommands.cfg, everything works.

The user has been added and has sufficient privileges on the mysql 
server to get a database connection, so everything should be ok there.  
nagios is running as the user nagios (checked with ps), so that should 
be ok.
I was under the impression that check_mysql should use the 
~nagios/.my.cnf file for its login information, is this not the case?


--
Kind Regards,
John Breen

HGAIT
Tel: 08 9425 5233
Fax: 08 9425 5255
Level 9, 256 Adelaide Terrace, Perth, WA 6000
Postal P.O.Box 1240, West Perth, WA, 6872


The information in this E-mail is confidential. If you are not the named
& intended recipient, you must not read, use, copy, disclose or
disseminate this E-mail, any attachments or the information contained in
this E-mail and must immediately notify the sender & delete this E-mail
immediately. Although HGAIT believes that this E-mail and any
attachments are free of any virus or other defect which may affect a
computer, it is the responsibility of the recipient to ensure that it is
virus free. HGAIT does not accept any responsibility for any loss or
damage arising in any way from the use of this E-mail or any
attachments.



IMPORTANT INFORMATION

This is not a SPAM. The SPAM Act 2003 commenced on the 10th April 2004
and requires consent to the sending of most commercial electronic
messages. If you wish to continue receiving electronic communications
from HGAIT, you do not need to take any action.



If you DO NOT wish to continue receiving electronic communications from
HGAIT please advise us at [EMAIL PROTECTED] and we will update our
records accordingly.




---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&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


[Nagios-users] check_http ssl certificate

2006-05-30 Thread Scott McCamish (Contractor)

Hi all-

A web server was recently upgraded, and my check_http --ssl service is 
now failing.


The server is sending a certificate when accessing through a browser.  
How can I
accept the certificate; either permanently through the nagios user cmd 
line, or through

flags to check_http?

'check_http --ssl H xyzxyz -C 14' works fine to see the expiration...

I did read a recent thread that suggested the servers http config be 
changed, but I don't have

access/approval to change the server config.

Thanks for reading!

Nagios 1.2 (I'll be upgrading soon)

$ ./check_http -H xyzxyz --ssl -f=follow -v
GET / HTTP/1.0
User-Agent: check_http/1.89 (nagios-plugins 1.4.3)
Host: xyzxyz

No data received
$
begin:vcard
fn:Scott McCamish
n:McCamish;Scott
org:USNA;ITSD
adr:181 Wainwright Road;;Halligan Hall;Annapolis;MD;21402;USA
email;internet:[EMAIL PROTECTED]
title:Network Engineer
tel;work:410 293-3896
tel;fax:410 293-3898
tel;cell:443 871-1402
version:2.1
end:vcard



[Nagios-users] Single notification for multiple devices

2006-05-30 Thread Mike Bambic
If multiple hosts go down at the same time I would like to combine
 the notifications into one email. I got spoiled with NMIS allowing
 me to do this and was hoping Nagios has something like this as
 well.

Thanks!

Mike





- Mike Bambic (mtxpert)



---

The mailing list archive is found here:

http://www.nagiosexchange.org/nagios-users.34.0.html




---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
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] Single notification for multiple devices

2006-05-30 Thread Mike Bambic
If multiple hosts go down at the same time I would like to combine
 the notifications into one email. I got spoiled with NMIS allowing
 me to do this and was hoping Nagios has something like this as
 well.

Thanks!

Mike





- Mike Bambic (mtxpert)



---

The mailing list archive is found here:

http://www.nagiosexchange.org/nagios-users.34.0.html




---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
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] Single notification for multiple devices

2006-05-30 Thread Mike Bambic
If multiple hosts go down at the same time I would like to combine
 the notifications into one email. I got spoiled with NMIS allowing
 me to do this and was hoping Nagios has something like this as
 well.

Thanks!

Mike





- Mike Bambic (mtxpert)



---

The mailing list archive is found here:

http://www.nagiosexchange.org/nagios-users.34.0.html




---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
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] NRPE SSL connection errors

2006-05-30 Thread Lundgren, Scott



I have two servers I am monitoring with NRPE 2.0. One works, one does not 
and I'm running out of ideas of configuration settings that must not be the same 
to have this happen:[EMAIL PROTECTED] # ./check_nrpe -H servera -c 
check_apacheOK - 12 processes running with UID = 155 
(apache)[EMAIL PROTECTED] # ./check_nrpe -H serverb -c 
check_apacheCHECK_NRPE: Error - Could not complete SSL 
handshake.nagioshost, servera and serverb are all Solaris 
9.nagioshost is running nagios 1.2, check_nrpe 2.0I have confirmed with 
ldd that NRPE is compiled with SSL support.servera & serverb both have 
copies of the same NRPE 2.0 binary.servera & serverb both have the SSL 
libraries that the NRPE binary was compiled againstservera & serverb 
both have /usr/local/nagios/etc/nrpe.cfg owned by nagios:nagios and chmod'd 
644servera & serverb both have "nrpe 5666/tcp #NRPE" in 
/etc/servicesservera & serverb both have "*.nrpe *.* 0 0 49152 0 LISTEN" 
in netstat -a|grep nrpeservera & serverb both have "nrpe stream tcp 
nowait nagios /usr/sfw/sbin/tcpd /usr/local/nagios/bin/nrpe -c 
/usr/local/nagios/etc/nrpe.cfg -i" in /etc/inetd.confHere's the 
difference:if I telnet from nagioshost to servera on port 5666 (from 
nrpe.cfg) I can count to 20 and when I enter some text followed by enter, 
servera closes the connectionif I telnet from nagioshost to serverb on port 
5666 (from nrpe.cfg) I can only count to 5 before serverb closes the 
connection. 
if I repeat the task from nagioshost 
to serverb and start typing as soon as prompted serverb will close the 
connection in the middle of typing. So i think what is happening is that 
the connection is closing before the SSL handshake is completed or the NRPE 
handoff to a local command. 
How do I figure out what in serverb is closing the connection so 
fast?
 
Scott Lundgren
ITS - Web 
Services
UNC at 
Charlotte
http://www.uncc.edu
 
 


Re: [Nagios-users] status.dat on /tmp causes status.cgi issues

2006-05-30 Thread Kyle Tucker
Thanks Eli. Even better, changing temp_file to reside in /tmp at the same 
time as status_file seems to have eliminated these status.cgi errors.

> Search the recent archives, as of the last three weeks this has been =
> addressed and resolved by Ethan.  Track down those posts for info, =
> there's a pending-confirmation fix in CVS as well as a workaround (move =
> your status.dat file back to the same filesystem).

> -Original Message-
> From: [EMAIL PROTECTED] on behalf of Kyle Tucker
> Sent: Tue 5/30/2006 8:39 AM
> To: Nagios Mailing List
> Subject: [Nagios-users] status.dat on /tmp causes status.cgi issues
> =20
> Hi,
>   Nagios 2.0b5 on Solaris 10. I've been running this=20
> setup for some time and just recently started seeing "Internal=20
> Server Error" on page refreshes from Firefox, with Apache=20
> reporting "Premature end of script headers".  The only changes=20
> recently are that I increased the host and service checks=20
> significantly  (up to 250 and 5200 respectively)  and I moved=20
> status.dat from a UFS file system to /tmp  (tmpfs) per the=20
> performance page tip #2 on using RAM-based filesystem for it.=20
>   I searched the mailing list archives and turned on debug=20
> level logging in Apache but it doesn't report any more.
>   If I run status.cgi from command line, it dumps core for=20
> a seg fault as shown below. I tried the status.cgi from 2.3 with=20
> the same results. If I move status.dat back to disk, the CGI
> errors stop, but I still get a seg fault running from command=20
> line. There are no core files created when the error occurs from
> Apache. Any idea why this may be occuring? Here's some command=20
> line output.
> 
> bash-3.00$ ./status.cgi =20
> Cache-Control: no-store
> Pragma: no-cache
> Refresh: 90
> Last-Modified: Tue, 30 May 2006 14:00:55 GMT
> Expires: Thu, 01 Jan 1970 00:00:00 GMT
> Content-type: text/html
> 
> 
> 
> 
> Current Network Status
> 
>  [ snipped ]
> 
> V CLASS=3D'hostTotals'>Host Status Totals
> 
> 
> 
> 
> Segmentation Fault (core dumped)
> 
> bash-3.00$ file core
> core:   ELF 32-bit MSB core file SPARC Version 1, from =
> 'status.cgi'
> 
> Here's the tail'd output from truss.
> 
> write(1, " < T R >\n", 5)   =3D 5
> Incurred fault #6, FLTBOUNDS  %pc =3D 0xFF230BF0
>   siginfo: SIGSEGV SEGV_MAPERR addr=3D0x
> Received signal #11, SIGSEGV [default]
>   siginfo: SIGSEGV SEGV_MAPERR addr=3D0x

-- 
- Kyle 
-
[EMAIL PROTECTED]   http://www.panix.com/~kylet
-


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&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] status.dat on /tmp causes status.cgi issues

2006-05-30 Thread Eli Stair
Title: RE: [Nagios-users] status.dat on /tmp causes status.cgi issues







Search the recent archives, as of the last three weeks this has been addressed and resolved by Ethan.  Track down those posts for info, there's a pending-confirmation fix in CVS as well as a workaround (move your status.dat file back to the same filesystem).

Cheers,

/eli

-Original Message-
From: [EMAIL PROTECTED] on behalf of Kyle Tucker
Sent: Tue 5/30/2006 8:39 AM
To: Nagios Mailing List
Subject: [Nagios-users] status.dat on /tmp causes status.cgi issues

Hi,
    Nagios 2.0b5 on Solaris 10. I've been running this
setup for some time and just recently started seeing "Internal
Server Error" on page refreshes from Firefox, with Apache
reporting "Premature end of script headers".  The only changes
recently are that I increased the host and service checks
significantly  (up to 250 and 5200 respectively)  and I moved
status.dat from a UFS file system to /tmp  (tmpfs) per the
performance page tip #2 on using RAM-based filesystem for it.
    I searched the mailing list archives and turned on debug
level logging in Apache but it doesn't report any more.
    If I run status.cgi from command line, it dumps core for
a seg fault as shown below. I tried the status.cgi from 2.3 with
the same results. If I move status.dat back to disk, the CGI
errors stop, but I still get a seg fault running from command
line. There are no core files created when the error occurs from
Apache. Any idea why this may be occuring? Here's some command
line output.

bash-3.00$ ./status.cgi 
Cache-Control: no-store
Pragma: no-cache
Refresh: 90
Last-Modified: Tue, 30 May 2006 14:00:55 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-type: text/html




Current Network Status

 [ snipped ]

V CLASS='hostTotals'>Host Status Totals




Segmentation Fault (core dumped)

bash-3.00$ file core
core:   ELF 32-bit MSB core file SPARC Version 1, from 'status.cgi'

Here's the tail'd output from truss.

write(1, " < T R >\n", 5)   = 5
    Incurred fault #6, FLTBOUNDS  %pc = 0xFF230BF0
  siginfo: SIGSEGV SEGV_MAPERR addr=0x
    Received signal #11, SIGSEGV [default]
  siginfo: SIGSEGV SEGV_MAPERR addr=0x

--
- Kyle
-
[EMAIL PROTECTED]   http://www.panix.com/~kylet   
-
--
- Kyle
-
[EMAIL PROTECTED]   http://www.panix.com/~kylet   
-


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&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








[Nagios-users] No Performnce Data

2006-05-30 Thread daniel.siegers








Hi list,

 

i compiled nagios-1.4.1 with --with-default-perfdata
parameter.

 

I’ve got

 

cfg_file=/usr/local/nagios/etc/misccommands.cfg

process_performance_data=1

host_perfdata_command=process-host-perfdata

service_perfdata_command=process-service-perfdata

 

in my main.cfg and

 

# 'process-host-perfdata' command definition

define command{

    command_name    process-host-perfdata

    command_line    /bin/echo -e
"$LASTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$STATETYPE$\t$EXECUTIONTIME$\t$OUTPUT$\t$PERFDATA$"
>> /usr/local/

nagios/var/host-perfdata

 

    }

 

 

# 'process-service-perfdata' command definition

define command{

    command_name    process-service-perfdata

    command_line   
/usr/local/nagios/bin/fifo_write.pl /var/lib/nagios/ngraph.pipe
'$HOSTNAME$\t$SERVICEDESC$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n' 3

    }

 

In my misccommands.cfg

 

I’ve got

 

Performance Data Being Processed? Yes

 

In the process info. I disabled and reenabled it, but
I get nothing. I can’t even see some echo or fifo_write.pl processes running.

The commands are shown under ‘View Config’

 

Has anyone an idea what’s going wrong?

 

 



Mit freundlichen Grüßen / Kind regards

 

Daniel Siegers 

 

Bauer Systems KG

Systemadministration

Brieffach 18000

Burchardstraße 11

 

D-20077 Hamburg

 

Telefon  +49 (0)40-3019-3936

Fax   +49
(0)40-3019-140-3936

E-Mail [EMAIL PROTECTED]



 








[Nagios-users] status.dat on /tmp causes status.cgi issues

2006-05-30 Thread Kyle Tucker
Hi,
Nagios 2.0b5 on Solaris 10. I've been running this 
setup for some time and just recently started seeing "Internal 
Server Error" on page refreshes from Firefox, with Apache 
reporting "Premature end of script headers".  The only changes 
recently are that I increased the host and service checks 
significantly  (up to 250 and 5200 respectively)  and I moved 
status.dat from a UFS file system to /tmp  (tmpfs) per the 
performance page tip #2 on using RAM-based filesystem for it. 
I searched the mailing list archives and turned on debug 
level logging in Apache but it doesn't report any more.
If I run status.cgi from command line, it dumps core for 
a seg fault as shown below. I tried the status.cgi from 2.3 with 
the same results. If I move status.dat back to disk, the CGI
errors stop, but I still get a seg fault running from command 
line. There are no core files created when the error occurs from
Apache. Any idea why this may be occuring? Here's some command 
line output.

bash-3.00$ ./status.cgi  
Cache-Control: no-store
Pragma: no-cache
Refresh: 90
Last-Modified: Tue, 30 May 2006 14:00:55 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-type: text/html




Current Network Status

 [ snipped ]

V CLASS='hostTotals'>Host Status Totals




Segmentation Fault (core dumped)

bash-3.00$ file core
core:   ELF 32-bit MSB core file SPARC Version 1, from 'status.cgi'

Here's the tail'd output from truss.

write(1, " < T R >\n", 5)   = 5
Incurred fault #6, FLTBOUNDS  %pc = 0xFF230BF0
  siginfo: SIGSEGV SEGV_MAPERR addr=0x
Received signal #11, SIGSEGV [default]
  siginfo: SIGSEGV SEGV_MAPERR addr=0x

-- 
- Kyle 
-
[EMAIL PROTECTED]   http://www.panix.com/~kylet
-
-- 
- Kyle 
-
[EMAIL PROTECTED]   http://www.panix.com/~kylet
-


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&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


[Nagios-users] Ping works but check_ping doesnt

2006-05-30 Thread Oliver Marshall
I have a server, which is running on the local network with Nagios. I
can ping it from the nagios box at the ssh prompt, but the
check-host-alive for that server is showing it as down. All the other
local servers are fine.

My check-host-alive command reads;

define  command {
command_namecheck-host-alive
command_line$USER1$/check_ping -H $HOSTADDRESS$ -w
3000.0,80% -c 5000.0,100% -p 1
}

On the Host detail screen on the nagios web interface, it says that the
host status is "DOWN" and the host output is "No Output".

Any ideas why I would be able to ping a box from the nagios server, but
not get a positive result from the check-host-alive test ?

Olly



---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
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] Checks that compare previous values

2006-05-30 Thread Marco Ramos

Hi,

On Tue, 2006-05-30 at 15:55 +0100, Jee Kay wrote:
> Is there some way to make checks compare the value they've retrieved
> against the previous value of that service?
> 
> Specifically, I would like to be able to alert on excessive throughput
> on some switchports. The obvious way to do this is check the inOctets
> every minute and compare the value just retrieved against the last
> value; if that *8/60 is more than a certain amount then we need to
> alarm.
> 
> A rough timeline would be:
> 
> 000 seconds: Check; gets 150. No previous value - ignore completely.
> 060 seconds: Check; gets 300. Total bytes passed in the last minute = 150. OK.
> 120 seconds: Check; gets 300. Total bytes passed in the last
> minute = too many. WARNING.
> 
> 
> Is there any functionality in Nagios that would make this sort of
> thing easy, or do I need to write a wrapper of some description for
> this?

No. I think the easiest way is to write a wrapper that writes each
script iteration to disk so it can always compare each iteration with
the previous one. I'm using this approach in some scripts and it works
fine.

HTH,
Marco Ramos

> Thanks in advance,
> Ras
> 
> 
> ---
> All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> Fully trained technicians. The highest number of Red Hat certifications in
> the hosting industry. Fanatical Support. Click to learn more
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&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
> 



---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&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


[Nagios-users] Checks that compare previous values

2006-05-30 Thread Jee Kay

Is there some way to make checks compare the value they've retrieved
against the previous value of that service?

Specifically, I would like to be able to alert on excessive throughput
on some switchports. The obvious way to do this is check the inOctets
every minute and compare the value just retrieved against the last
value; if that *8/60 is more than a certain amount then we need to
alarm.

A rough timeline would be:

000 seconds: Check; gets 150. No previous value - ignore completely.
060 seconds: Check; gets 300. Total bytes passed in the last minute = 150. OK.
120 seconds: Check; gets 300. Total bytes passed in the last
minute = too many. WARNING.


Is there any functionality in Nagios that would make this sort of
thing easy, or do I need to write a wrapper of some description for
this?

Thanks in advance,
Ras


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&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


[Nagios-users] Parsing a Nagios 2 configuration file from perl

2006-05-30 Thread Marc Haber
Hi,

I'd like to have a list of all host_name directives in host
definitions in a nagios 2 template style configuration in a perl script.

Did anybody already write a nagios 2 configuration file parser in perl?

Greetings
Marc

-- 
-
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&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] Checking host alive and NSClient++

2006-05-30 Thread John P. Rouillard

In message <[EMAIL PROTECTED]>,
"Oliver Marshall" writes:
>I have a server at a remote site which uses a router that WONT allow
>forwarding of ICMP (aka ping) traffic to the server. As a result, the
>check-host-alive command for that server currently actually shows the
>state of the router, not the server itself.
>
>This isn't good for me as the adsl line they use is up and down like a
>yo-yo.

Can you get traps from the ASDL equipment or router?

>Is there a command I can create using NSClient++ that will check to see
>the state of the host WITHOUT pinging, perhaps instead using a check of
>the NSClient++ itself.

I assume this is a windows box since you mention nsclient++. How about
a check_tcp against the nsclient++ port? Are ther other network
services on that box that you monitor?

-- rouilj
John Rouillard
===
My employers don't acknowledge my existence much less my opinions.


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&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] SMS notification

2006-05-30 Thread Oliver Hitz
Hi

On 29 May 2006, MAIGNAN Luc wrote:
> what is the simplest way to be notified by sms instead of e-mail ?

You can find a simple script here that allows you to send SMS using the
aspsms.com service:

http://www.net-track.ch/opensource/perlaspsms/

Of course, this does not work if you use nagios to monitor your Internet
connection.

Regards

Oliver


signature.asc
Description: Digital signature


Re: [Nagios-users] SMS notification

2006-05-30 Thread Assaf Flatto
We attached a modem to the Nagios and install Kannel 
(http://kannel.org/)on the server and it sends all the sms's we need 
with no problem - the only thing you need to worry about is the SIM card.



Assaf
MAIGNAN Luc wrote:

Hello,


what is the simplest way to be notified by sms instead of e-mail ?


*
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à 
l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur. 
Toute utilisation de ce message non conforme à sa destination, modification, diffusion ou 
toute publication, totale ou partielle, est interdite, sauf autorisation expresse.FININFO 
(et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans 
l'hypothèse ou il aurait été modifié, altéré, falsifié ou encore édité ou diffusé sans 
autorisation.
-
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. Neither FININFO (nor any of its subsidiaries or affiliates) 
shall be liable for the message if modified, altered, falsified, edited 
or diffused without authorization. **



---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=k&kid7521&bid$8729&dat1642
___
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
  


--
Assaf Flatto
Cellular: +972-54-5679230
e-mail: [EMAIL PROTECTED]
MSN : [EMAIL PROTECTED]



---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
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] SMS notification

2006-05-30 Thread Michael Jewett
I use sendpage and finally convinced my cellphone provider to give me a 
phone number that my modem dials.  It then sends the message as SMS to 
our cellphones.


http://sendpage.org

works great.

Michael

 Original Message  
From: "MAIGNAN Luc" <[EMAIL PROTECTED]>
To: nagios-users@lists.sourceforge.net
Subject: [Nagios-users] SMS notification
Date: Mon May 29 2006 09:02:41 GMT-0300 (Atlantic Daylight Time)


Hello,


what is the simplest way to be notified by sms instead of e-mail ?


*
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à 
l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur. 
Toute utilisation de ce message non conforme à sa destination, modification, diffusion ou 
toute publication, totale ou partielle, est interdite, sauf autorisation expresse.FININFO 
(et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans 
l'hypothèse ou il aurait été modifié, altéré, falsifié ou encore édité ou diffusé sans 
autorisation.
-
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. Neither FININFO (nor any of its subsidiaries or affiliates) 
shall be liable for the message if modified, altered, falsified, edited 
or diffused without authorization. **



---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=k&kid7521&bid$8729&dat1642
___
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



---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
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] Checking host alive and NSClient++

2006-05-30 Thread Oliver Marshall
Hi,

I have a server at a remote site which uses a router that WONT allow
forwarding of ICMP (aka ping) traffic to the server. As a result, the
check-host-alive command for that server currently actually shows the
state of the router, not the server itself.

This isn't good for me as the adsl line they use is up and down like a
yo-yo.

Is there a command I can create using NSClient++ that will check to see
the state of the host WITHOUT pinging, perhaps instead using a check of
the NSClient++ itself.

Olly


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
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] Nagios2 on ubuntu server

2006-05-30 Thread Ingo Lantschner

"J J" <[EMAIL PROTECTED]> schrieb
am 12.05.2006 17:17:13:

> Saw your post looking for Nagios2 for ubuntu server. Can I ask what
did
> you end up doing? 

Dear Jay,
I decided to compile and install it
from source. I can say, it was a good decision. The only glitch was that
I had to reinstall 
Here is what I did after enabeling the
dev-repositories in /etc/apt/sources.list
 # apt-get install gcc
 # apt-get --reinstall install libc6-dev
 # apt-get install make
 hth Ingo

R: [Nagios-users] SMS notification

2006-05-30 Thread Marco Borsani
Does anybody use smstools on HP-UX platform?
I installed it easily on Linux, but I can not do it on HP-UX 11.0.

I received this error message:
modeminit.c: In function 'write_to_modem':
modeminit.c:58: error: 'MCTS' undeclared (first use in this function)
modeminit.c:58: error: (Each undeclared identifier is reported only once
modeminit.c:58: error: for each function it appears in.)
modeminit.c: In function 'setmodemparams':
modeminit.c:193: warning: incompatible implicit declaration of built-in
function 'bzero'
gmake[1]: *** [modeminit.o] Error 1
gmake: *** [compile] Error 2

Any idea?
Marco

-}-Messaggio originale-
-}Da: [EMAIL PROTECTED] 
-}[mailto:[EMAIL PROTECTED] Per conto 
-}di Luca Corti
-}Inviato: lunedì 29 maggio 2006 14.06
-}A: MAIGNAN Luc
-}Cc: nagios-users@lists.sourceforge.net
-}Oggetto: Re: [Nagios-users] SMS notification
-}
-}On Mon, 2006-05-29 at 14:02 +0200, MAIGNAN Luc wrote:
-}> what is the simplest way to be notified by sms instead of e-mail ?
-}
-}Installing an AT GSM Modem and management software and 
-}customising your notification command.
-}
-}http://smstools.meinemullemaus.de/
-}
-}
-}--
-}Luca Corti
-}PGP Key ID 1F38C091
-}BOFH excuse of the moment:
-}knot in cables caused data stream to become twisted and kinked
-}
-}
-}
-}---
-}All the advantages of Linux Managed Hosting--Without the Cost 
-}and Risk!
-}Fully trained technicians. The highest number of Red Hat 
-}certifications in
-}the hosting industry. Fanatical Support. Click to learn more
-}http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&;
-}dat=121642
-}___
-}Nagios-users mailing list
[EMAIL PROTECTED]
-}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
-}



---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
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] nrpe sockect timeouts

2006-05-30 Thread Greg Cope, e-DBA Team
HI All,

When some of my hosts get a little busy (load 4+) I get loads of socket
timeouts.

Is the level of SSL (AES-something) I am using too high?

Does the nrpe daemon need to be niced to get it some CPU?  Or do people
use xinetd?  Each host runs about 10 local, nrpe checks every 5 mins or
so.

Extending the socket timeout on check_nrpe can be done globally on the
nagios server, but this seems a kludge as 10secs should be more than
enough to get a connection.

Any thoughts?

Greg


On Tue, 2006-05-30 at 09:59 +0100, nagios wrote:
> * Nagios  *
> 
> Notification Type: PROBLEM
> 
> Service: LOAD
> Host: Oracle Rac Node 1
> Address: 
> State: CRITICAL
> 
> Date/Time: Tue May 30 09:59:22 BST 2006
> 
> Additional Info:
> 
> CHECK_NRPE: Socket timeout after 10 seconds.



---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&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] SMS notification

2006-05-30 Thread Oliver Marshall


-Original Message-
From: Oliver Marshall 
Sent: 29 May 2006 17:19
To: 'Nicki Messerschmidt, Linksystem Muenchen GmbH';
'[EMAIL PROTECTED]'
Subject: RE: [Nagios-users] SMS notification

Out of curiosity, which clickatell.com package have you signed up for? I
have been thinking about using them for SMS alerting from nagios, but
I've been waiting to find someone else who can recommend them.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nicki
Messerschmidt, Linksystem Muenchen GmbH
Sent: 29 May 2006 14:46
To: nagios-users@lists.sourceforge.net
Subject: Re: [Nagios-users] SMS notification

MAIGNAN Luc said the following:
> what is the simplest way to be notified by sms instead of e-mail ?
Well... I set up an account at www.clickatell.com. This is a email to
sms gateway. Then I modified my email script.

I think that it won't be more hassle than to setup a modem and sending
directly.


Cheers
Nicki




---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications
in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&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


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
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] external command execution problem

2006-05-30 Thread atstake atstake

I been trying to reschedule checks & nagios tells me "Error: Could not
stat() command file '/usr/local/nagios/var/rw/nagios.cmd'!"

I followed - http://nagios.sourceforge.net/docs/2_0/commandfile.html

Nagios runs are user: _nagios
Apache runs as user: www

Here are some outputs -

grep _nagios /etc/passwd
_nagios:*:550:550:Nagios user:/var/www/nagios:/sbin/nologin

ls -ld /usr/local/nagios/var/rw/
drwxrwxrwx  2 _nagios  nagiocmd  512 May 29 15:41 /usr/local/nagios/var/rw/

ls -la /usr/local/nagios/var/rw/nagios.cmd
prwxrwxrwx  1 _nagios  nagiocmd  0 May 29 15:41
/usr/local/nagios/var/rw/nagios.cmd

grep nagios /etc/group
www:*:67:_nagios
_nagios:*:550:www,_nagios
nagiocmd:*:1005:_nagios,www,nagiosadmin

grep ^User /var/www/conf/httpd.conf
User www

grep ^Group /var/www/conf/httpd.conf
Group www

ps auxww | grep httpd
www  29128  0.0  1.9  1268  2404 ??  Ss 2:15PM0:01.32
httpd: parent [chroot /var/www] (httpd)

Nagiosn version: 2.0b4
OS: OpenBSD

TIA.


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&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