perfdata

Manish Sapariya manishs at gs-lab.com
Mon Apr 16 10:26:46 CEST 2007


Hi,
I ran into same problem, I got it working by changing the insert.pl. I 
am not sure
if my config was wrong or there is something wrong in nagios or nagiosgraph.

----------------Changed code in insert.pl-------------------
# Parse performance data from input
#
sub parseinput {
  my $data = shift;
  #debug(5, "INSERT perfdata: $data");

  #my @d = split( /\|\|/, $data);

### Note the the split delimiter in below line, No matter what I do to 
configure the
#nagios, I cannot make it print || in the perfdata. It always separated the
# fields with tab. Also the index used below had to be adjusted according
#to how nagios wrote the performance data file.

  my @d = split( /\t/, $data);

  return ( lastcheck    => $d[1],
           hostname     => $d[2],
           servicedescr => $d[3],
           output       => $d[6],
           perfdata     => $d[7],
         );
}
----------------------------------------------------------------

Hope this help.
Regards,
Manish

Weiner, Michael wrote:
> Using Nagios 2.8 and I am not sure what I am doing wrong. Been trying to
> squeeze out some perfdata in order to test nagiosgraph and I get Nagios
> to create the file, but it remains empty no matter what occurs. Here are
> the relevant portions of my nagios.cfg for clarification:
>
> nagios.cfg:
> perfdata_timeout=5
> process_performance_data=1
> #service_perfdata_command=process-service-perfdata
> service_perfdata_file=/var/spool/nagios/perfdata.log
> service_perfdata_file_template=$LASTSERVICECHECK$||$HOSTNAME$||$SERVICED
> ESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$
> service_perfdata_file_mode=a <-- had this set to w based on a previous
> email, but that didn't seem to do anything
> service_perfdata_file_processing_interval=30
> service_perfdata_file_processing_command=process-service-perfdata
>
> checkcommands.cfg:
> define command{
>         command_name            process-service-perfdata
>         command_line    /usr/bin/perl
> /usr/share/nagios/nagiosgraph/insert.pl
> }
>
> I just can NOT seem to get anything written to the perfdata.log file
> although nagios DOES create it upon (re)start.
>
> Any thoughts?
>
> 	 Michael Weiner |  Lead Analyst  |  Lerner Research Institute
> Cleveland Clinic  |  9500 Euclid Ave.   |  Cleveland, OH 44195  | (216)
> 445-6454
>
>
>
>
>
> 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.
>
>
> ===================================
>
> -------------------------------------------------------------------------
> 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 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
>
>   


-------------------------------------------------------------------------
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/
_______________________________________________
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