<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Perfomance Data via NDO?</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR>
<STYLE>@font-face {
        font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
P {
        FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman"
}
SPAN.EmailStyle18 {
        FONT-WEIGHT: normal; COLOR: blue; FONT-STYLE: normal; FONT-FAMILY: Arial; TEXT-DECORATION: none
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=241015815-03052006><FONT face=Arial 
color=#0000ff size=2>You'll need to pass the $SERVICEPERFDATA$ variable into the 
submission script as well.  I tweaked my nsca submission command to include 
$SERVICEPERFDATA$ in the command configuration, then changed the prontf line in 
the submission script like this:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=241015815-03052006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=241015815-03052006><FONT face=Arial 
color=#0000ff size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">/usr/bin/printf 
"%s\t%s\t%s\t%s|%s\n" "$1" "$2" "$return_code" "$4" "$5" | 
/usr/local/nagios/libexec/send_nsca -H <HOST> -to 15 -c 
/usr/local/nagios/etc/send_nsca.cfg</SPAN></FONT></SPAN></DIV><FONT face=Arial 
color=#0000ff size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> nagios-users-admin@lists.sourceforge.net 
[mailto:nagios-users-admin@lists.sourceforge.net] <B>On Behalf Of </B>Mike 
Koponick<BR><B>Sent:</B> Tuesday, May 02, 2006 2:50 PM<BR><B>To:</B> 
nagios-users@lists.sourceforge.net<BR><B>Subject:</B> RE: [Nagios-users] 
Perfomance Data via NDO?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"><!-- Converted from text/rtf format -->I 
might be closer to answer my own question, but I think this is a 
“submit_check_result” issue, rather than NDO issue. Looking through the NDO 
source code, I see where it has the ability to write to the perfdata column. I 
think the problem lies within the “submit_check_results” command. It doesn’t 
really send the performance data, but rather drops it.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">Here is my 
output:</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">./check_snmp_int -H 
10.1.1.1 -C public -n -f</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">em1:UP, em0:UP, 
exp0:UP:3 UP: OK</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"> | 
'em1_in_octet'=381357882c 'em1_out_octet'=1161492429c 'em0_in_octet'=1464302566c 
'em0_out_octet'=550763402c 'exp0_in_octet'=70379851c 
'exp0_out_octet'=56255289c</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">I think it has to do 
with the single quotes and the “|” (pipe) . I by far am no programmer. 
</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">My submit_check_result 
is the typical one that comes with Nagios.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">Here it 
is:</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">#!/bin/sh</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"># 
Arguments:</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"># $1 = host_name (Short 
name of host that the service is</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"># associated 
with)</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"># $2 = svc_description 
(Description of the service)</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"># $3 = state_string (A 
string representing the status of</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"># the given service - 
"OK", "WARNING", "CRITICAL"</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"># or 
"UNKNOWN")</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"># $4 = plugin_output (A 
text string that should be used</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"># as the plugin output 
for the service checks)</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">#</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"># Convert the state 
string to the corresponding return code</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">return_code=-1</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">        
case "$3" in</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">        
OK)</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">        
return_code=0</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">;;</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">        
WARNING)</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">        
return_code=1</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">;;</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">        
CRITICAL)</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">        
return_code=2</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">;;</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">        
UNKNOWN)</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">        
return_code=3</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">;;</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">        
esac</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">/usr/bin/printf 
"%s\t%s\t%s\t%s\n" "$1" "$2" "$return_code" "$4"  | 
/usr/local/nagios/libexec/send_nsca -H <HOST> -to 15 -c 
/usr/local/nagios/etc/send_nsca.cfg</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">Thoughts?</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial">Mike</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN 
style="FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Tahoma size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original 
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> 
nagios-users-admin@lists.sourceforge.net 
[mailto:nagios-users-admin@lists.sourceforge.net] <B><SPAN 
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Mike Koponick<BR><B><SPAN 
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Tuesday, May 02, 2006 10:41 
AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> 
nagios-users@lists.sourceforge.net<BR><B><SPAN 
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [Nagios-users] Perfomance Data via 
NDO?</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=3><SPAN 
style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Hello Everyone,</SPAN></FONT></P>
<P style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=3><SPAN 
style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">For some odd reason, I have it in my 
head that you can write performance data into the NDO tables via a 
service</SPAN></FONT> <FONT face=Arial><SPAN 
style="FONT-FAMILY: Arial">check</SPAN></FONT> <FONT face=Arial><SPAN 
style="FONT-FAMILY: Arial">command. I have looked at PerfParse, but quite 
frankly, adding on, yet another add-on seems like more work than it should be. 
I’m looking for bandwidth utilization type performance, uptime, interface 
errors, etc. I would like to write that the perfdata column for the 
ndo_servicestatus table.</SPAN></FONT></P>
<P style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=3><SPAN 
style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">I can use the check_snmp check for 
the interface errors, and write the data. But I wonder if that’s the correct 
direction.</SPAN></FONT> </P>
<P style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=3><SPAN 
style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Am I off base here, or do I need 
another cup of coffee?</SPAN></FONT></P>
<P style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=3><SPAN 
style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Thanks in advance,</SPAN></FONT></P>
<P style="MARGIN-LEFT: 0.5in"><FONT face=Arial size=3><SPAN 
style="FONT-SIZE: 12pt; FONT-FAMILY: Arial">Mike</SPAN></FONT><A 
name=""></A></P></DIV></BODY></HTML>