Nagiosgraph: RRDsdoesn'tgenerateanewdatabase

Pietrangelo, Nicholas npietrangelo at jewels.com
Mon Apr 30 21:05:28 CEST 2007


A Special thanks to Michael and Glynn in teaching me about Nagios.

 

 

I misinterrepted the command definition for the
process-service-perfdata.

 

#       #command_line   /usr/bin/printf "%b"
"$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SE
RVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATEN
CY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\                             n"
>> /var/log/nagios/service-perfdata.out

#       command_line    /etc/nagios/nagiosgraph-0.8.2/insert.pl
"$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||
$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$"

#       }

#

##

 

define command {

        command_name process-service-perfdata

        command_line /usr/bin/perl
/etc/nagios/nagiosgraph-0.8.2/insert.pl

        }

 

I believe I am now getting the correct output with only a few errors.
What is an illegal attempt?  See below.

 

Mon Apr 30 15:02:02 2007 INSERT info: Input servicedescr:Current Users

Mon Apr 30 15:02:02 2007 INSERT info: Input output:USERS OK - 2 users
currently logged in

Mon Apr 30 15:02:02 2007 INSERT debug: Checking
/var/adm/logs/nagios/rrd/localhost_Current%20Users_procs.rrd

Mon Apr 30 15:02:02 2007 INSERT info: RRDs::update
/var/adm/logs/nagios/rrd/localhost_Current%20Users_procs.rrd
1177959662:2:20:50

Mon Apr 30 15:02:02 2007 INSERT error: RRDs::update ERR illegal attempt
to update using time 1177959662 when last update time is 1177959662
(minimum one second step)

Mon Apr 30 15:02:02 2007 INSERT debug: nagiosgraph exited

Mon Apr 30 15:02:02 2007 INSERT error: RRDs::update ERR illegal attempt
to update using time 1177959662 when last update time is 1177959662
(minimum one second step)

 

________________________________

From: Weiner, Michael [mailto:weinerm at ccf.org] 
Sent: Thursday, April 26, 2007 11:36 AM
To: Pietrangelo, Nicholas
Subject: RE: [Nagios-users] Nagiosgraph: RRDsdoesn'tgenerateanewdatabase

 

From: Pietrangelo, Nicholas [mailto:npietrangelo at jewels.com] 
Sent: Thursday, April 26, 2007 11:31 AM
To: Weiner, Michael
Subject: RE: [Nagios-users] Nagiosgraph: RRDs
doesn'tgenerateanewdatabase

 

Enabling perfdata?  I have:

 

What I meant is, I use nagiosweb for web interface to the config files
and was having a similar problem, couldn't get the rrds to go
automagically, and what I noticed was that nagiosweb still had perfdata
disabled even though I had the same settings as below...so I thought
maybe you might be running something else too...

 

process_performance_data=1  ::Is this necessary since
######service_perfdata_command=process-service-perfdata is commented
out?  (YES)

 

service_perfdata_file=/var/adm/logs/nagios/service-perfdata

service_perfdata_file_mode=a

service_perfdata_file_processing_interval=30

service_perfdata_file_processing_command=process-service-perfdata

 

then,

 

define command {

        command_name process-service-perfdata

        command_line /usr/bin/perl
/etc/nagios/nagiosgraph-0.8.2/insert.pl
"$HOSTNAME$||$SERVICEDESC$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERF
DATA$" (these variables aren't necessary here)

            }

________________________________

From: Weiner, Michael [mailto:weinerm at ccf.org] 
Sent: Thursday, April 26, 2007 11:26 AM
To: Pietrangelo, Nicholas
Subject: RE: [Nagios-users] Nagiosgraph: RRDs
doesn'tgenerateanewdatabase

 

Do y9ou run anything else like nagiosweb perhaps?? Check to ensure that
perfdata is actually enabled. I had the trouble of using nagiosweb and
it was keeping perfdata disabled even though I had it enabled in
nagios.cfg

 

HTH

 

 Michael Weiner |  Lead Analyst  |  Lerner Research Institute

 Cleveland Clinic  |  9500 Euclid Ave.   |  Cleveland, OH 44195  | (216)
445-7454

 

________________________________

From: Pietrangelo, Nicholas [mailto:npietrangelo at jewels.com] 
Sent: Thursday, April 26, 2007 11:19 AM
To: Weiner, Michael
Cc: nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Nagiosgraph: RRDs doesn't
generateanewdatabase

 

I made the changes that you suggested.  Still no success.  I was able to
create the rrd's after manaully running the insert.pl as the nagios
user.  Then, I had to revert back to my original serviceextinfo.cfg to
see the graphs.  Now I need to determine how to have this run
automagically.

 

Nick P

 

________________________________

From: Weiner, Michael [mailto:weinerm at ccf.org] 
Sent: Thursday, April 26, 2007 11:08 AM
To: Pietrangelo, Nicholas
Subject: RE: [Nagios-users] Nagiosgraph: RRDs doesn't
generateanewdatabase

 

Anything in the log and/or perfdata file?

 



 Michael Weiner |  Lead Analyst  |  Lerner Research Institute

 Cleveland Clinic  |  9500 Euclid Ave.   |  Cleveland, OH 44195  | (216)
445-7454

 

________________________________

From: Pietrangelo, Nicholas [mailto:npietrangelo at jewels.com] 
Sent: Thursday, April 26, 2007 10:57 AM
To: Weiner, Michael
Subject: RE: [Nagios-users] Nagiosgraph: RRDs doesn't generate
anewdatabase

 

Well,  I made the suggested changes and still nothing in the rrd.
@#$%@&

 

________________________________

From: Weiner, Michael [mailto:weinerm at ccf.org] 
Sent: Thursday, April 26, 2007 10:36 AM
To: Pietrangelo, Nicholas
Subject: RE: [Nagios-users] Nagiosgraph: RRDs doesn't generate
anewdatabase

 

You're welcome, hope that helps...as for previous work...not sure, I
have only been with the clinic for 3 months and before that with
AmericanGreetings.com so we may have met there actually

 

Michael



 Michael Weiner |  Lead Analyst  |  Lerner Research Institute

 Cleveland Clinic  |  9500 Euclid Ave.   |  Cleveland, OH 44195  | (216)
445-7454

 

________________________________

From: Pietrangelo, Nicholas [mailto:npietrangelo at jewels.com] 
Sent: Thursday, April 26, 2007 10:30 AM
To: Weiner, Michael
Subject: RE: [Nagios-users] Nagiosgraph: RRDs doesn't generate a
newdatabase

 

Thanks Michael.  Did I work with you when I was with VERITAS?

 

Cheers,

 

Nick P.

 

Nicholas J. Pietrangelo

Sterling Jewelers Inc.

Sr. WebSphere/UNIX/Linux Administrator

330-655-6182 office

440-829-7777 mobile

npietrangelo at jewels.com 

 

________________________________

From: Weiner, Michael [mailto:weinerm at ccf.org] 
Sent: Thursday, April 26, 2007 10:22 AM
To: Pietrangelo, Nicholas; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Nagiosgraph: RRDs doesn't generate a
newdatabase

 

Having just been through this, LOL....commented below:



 Michael Weiner |  Lead Analyst  |  Lerner Research Institute

 Cleveland Clinic  |  9500 Euclid Ave.   |  Cleveland, OH 44195  | (216)
445-7454

 

________________________________

From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of
Pietrangelo, Nicholas
Sent: Thursday, April 26, 2007 9:50 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Nagiosgraph: RRDs doesn't generate a new
database

 

I have followed all of the instructions from Wolfgang, the INSTALL file
from nagiosgraph-0.8.2 and any readme that I can find.  The
nagiosgraph.log is empty and the directory that I specify for the
"rrddir" is empty.  If I run the /usr/share/rrdtool/examples/perftest.pl
it generates a database.  Here is what I have:

 

Nagios.cfg

process_performance_data=1

service_perfdata_command=process-service-perfdata <-- not supposed to be
defined, comment this out as you define the
service_perfdata_file_processing_command below

service_perfdata_file=/var/adm/logs/nagios/service-perfdata

service_perfdata_file_template=$LASTSERVICECHECK$||$HOSTNAME$||$SERVICED
ESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$

service_perfdata_file_mode=a

service_perfdata_file_processing_command=process-service-perfdata

log_file=/var/adm/logs/nagios/nagios.log

status_file=/var/adm/logs/nagios/status.dat

command_file=/var/adm/logs/nagios/nagios.cmd

comment_file=/var/adm/logs/nagios/comments.dat

temp_file=/var/adm/logs/nagios/nagios.tmp

cfg_file=/etc/nagios/commands.cfg

cfg_file=/etc/nagios/contactgroups.cfg

cfg_file=/etc/nagios/contacts.cfg

cfg_file=/etc/nagios/dependencies.cfg

cfg_file=/etc/nagios/escalations.cfg

cfg_file=/etc/nagios/hostgroups.cfg

cfg_file=/etc/nagios/hosts.cfg

cfg_file=/etc/nagios/services.cfg

cfg_file=/etc/nagios/timeperiods.cfg

cfg_file=/etc/nagios/serviceextinfo.cfg

object_cache_file=/var/adm/logs/nagios/objects.cache

resource_file=/etc/nagios/resource.cfg

 

commands.cfg

........   shouldn't matter tho I have read mixed reviews I have the
path to perl before the insert.pl and you can remove the
"$LASTSERCIVE...." Its already defined in the service template

define command {

        command_name process-service-perfdata

        command_line /etc/nagios/nagiosgraph-0.8.2/insert.pl
"$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEDESC$||$SERVICEO
UTPUT$||$SERVICEPERFDATA$"

            }

 

Serviceextinfo.cfg

define serviceextinfo{

        service_description PING

        host_name       *

        notes_url
/nagiosgraph/show.cgi?host=$HOSTNAME$&service=PING <-- try notes_url
/nagiosgraph/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&geom=900x300

        icon_image      graph.gif

        icon_image_alt  show graphics

        }

 

Nagiosgraph.cfg

debug = 1

logfile = /var/adm/logs/nagios/nagiosgraph.log

rrddir =  /var/adm/logs/nagios/rrd

mapfile = /etc/nagios/nagiosgraph-0.8.2/map

perflog = /var/adm/logs/nagios/perfdata.log <-- define this the same as
above in the nagios.cfg (i.e.
service_perfdata_file=/var/adm/logs/nagios/service-perfdata

)

stylesheet = /usr/share/nagios/stylesheets/nagiosgraph.css

 

insert.pl

my $configfile = '/etc/nagios/nagiosgraph-0.8.2/nagiosgraph.conf';

 

Below shows that the nagiosgraph.log and rrddir is empty

 

[root at rh02 nagios]# pwd

/var/adm/logs/nagios

[root at rh02 nagios]# ls -alR

.:

total 1212

drwxrwxrwx    3 root     root         4096 Apr 26 09:48 .

drwxr-xr-x   13 root     root         4096 Apr 19 14:21 ..

-rw-rw-r--    1 nagios   nagios        238 Apr 25 14:04 comments.dat

-rw-rw-r--    1 nagios   nagios        239 Apr 25 14:04 downtime.dat

-rwxrwxr-x    1 nagios   nagios          0 Apr 19 14:22 nagiosgraph.log

-rw-r--r--    1 nagios   nagios       4114 Apr 26 09:06 nagios.log

-rw-r--r--    1 nagios   nagios       9337 Apr 25 15:06 objects.cache

-rw-------    1 nagios   nagios       7613 Apr 26 09:06 retention.dat

drwxr-xr-x    2 nagios   nagios       4096 Apr 25 15:06 rrd <-- might
want to make this 0775 rather than 0755 though either SHOULD work

-rw-r--r--    1 nagios   nagios    1179322 Apr 26 09:48 service-perfdata

-rw-rw-r--    1 nagios   nagios       7576 Apr 26 09:48 status.dat

 

./rrd:

total 8

drwxr-xr-x    2 nagios   nagios       4096 Apr 25 15:06 .

drwxrwxrwx    3 root     root         4096 Apr 26 09:48 ..

 

Make those few changes, stop and restart nagios and take a look at the
perfdata file you defined above to see if data is getting dumped there
and check the nagiosgraph.log

The information contained in this e-mail message is privileged and/or
confidential and is intended only for the use of the individual or
entity
named above. If the reader of this message is not the intended
recipient, or the employee or agent responsible to deliver it to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please immediately
notify us by telephone (330-668-5000), and destroy the original
message. Thank you. 
	





Cleveland Clinic is ranked one of the top 3 hospitals in
America by U.S.News & World Report. Visit us online at
http://www.clevelandclinic.org for a complete listing of
our services, staff and locations.


Confidentiality Note:  This message is intended for use
only by the individual or entity to which it is addressed
and may contain information that is privileged,
confidential, and exempt from disclosure under applicable
law.  If the reader of this message is not the intended
recipient or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If
you have received this communication in error,  please
contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy.  Thank you.


===================================

The information contained in this e-mail message is privileged and/or
confidential and is intended only for the use of the individual or
entity
named above. If the reader of this message is not the intended
recipient, or the employee or agent responsible to deliver it to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please immediately
notify us by telephone (330-668-5000), and destroy the original
message. Thank you. 
	





Cleveland Clinic is ranked one of the top 3 hospitals in
America by U.S.News & World Report. Visit us online at
http://www.clevelandclinic.org for a complete listing of
our services, staff and locations.


Confidentiality Note:  This message is intended for use
only by the individual or entity to which it is addressed
and may contain information that is privileged,
confidential, and exempt from disclosure under applicable
law.  If the reader of this message is not the intended
recipient or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If
you have received this communication in error,  please
contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy.  Thank you.


===================================

The information contained in this e-mail message is privileged and/or
confidential and is intended only for the use of the individual or
entity
named above. If the reader of this message is not the intended
recipient, or the employee or agent responsible to deliver it to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please immediately
notify us by telephone (330-668-5000), and destroy the original
message. Thank you. 
	





Cleveland Clinic is ranked one of the top 3 hospitals in
America by U.S.News & World Report. Visit us online at
http://www.clevelandclinic.org for a complete listing of
our services, staff and locations.


Confidentiality Note:  This message is intended for use
only by the individual or entity to which it is addressed
and may contain information that is privileged,
confidential, and exempt from disclosure under applicable
law.  If the reader of this message is not the intended
recipient or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If
you have received this communication in error,  please
contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy.  Thank you.


===================================

The information contained in this e-mail message is privileged and/or
confidential and is intended only for the use of the individual or
entity
named above. If the reader of this message is not the intended
recipient, or the employee or agent responsible to deliver it to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please immediately
notify us by telephone (330-668-5000), and destroy the original
message. Thank you. 
	

===================================




Cleveland Clinic is ranked one of the top 3 hospitals in
America by U.S.News & World Report. Visit us online at
http://www.clevelandclinic.org for a complete listing of
our services, staff and locations.


Confidentiality Note:  This message is intended for use
only by the individual or entity to which it is addressed
and may contain information that is privileged,
confidential, and exempt from disclosure under applicable
law.  If the reader of this message is not the intended
recipient or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If
you have received this communication in error,  please
contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy.  Thank you.



The information contained in this e-mail message is privileged and/or
confidential and is intended only for the use of the individual or
entity
named above. If the reader of this message is not the intended
recipient, or the employee or agent responsible to deliver it to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please immediately
notify us by telephone (330-668-5000), and destroy the original
message. Thank you. 
	





Cleveland Clinic is ranked one of the top 3 hospitals in
America by U.S.News & World Report. Visit us online at
http://www.clevelandclinic.org for a complete listing of
our services, staff and locations.


Confidentiality Note:  This message is intended for use
only by the individual or entity to which it is addressed
and may contain information that is privileged,
confidential, and exempt from disclosure under applicable
law.  If the reader of this message is not the intended
recipient or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If
you have received this communication in error,  please
contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy.  Thank you.


===================================



The information contained in this e-mail message is privileged and/or
confidential and is intended only for the use of the individual or entity
named above.  If the reader of this message is not the intended
recipient, or the employee or agent responsible to deliver it to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please immediately
notify us by telephone (330-668-5000), and destroy the original
message.  Thank you. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070430/fef86c74/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2074 bytes
Desc: image001.jpg
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070430/fef86c74/attachment.jpg>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at 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


More information about the Users mailing list