<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2800.1126" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Tahoma size=2>----Original Message-----<BR><B>From:</B> Pascal 
Miquet [mailto:p.miquet@hafiba.fr] <BR><B>Sent:</B> lundi, 2. décembre 2002 
18:29<BR><B>To:</B> Pascal Wessel<BR><B>Subject:</B> Re: [Nagios-users] 
check_snmp CPU Load strange result<BR><BR></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV>Sorry but I've got no answer for You, Just some questions according to 
  the Cisco 3640 Checks. <BR><BR>On which system did you have you nagios service 
  ? Linux ? <SPAN class=146403317-02122002><FONT face=Arial color=#0000ff 
  size=2> </FONT></SPAN></DIV>
  <DIV><SPAN class=146403317-02122002>    <FONT face=Arial 
  color=#0000ff size=2>YES on Linux</FONT></SPAN><FONT face=Arial><FONT 
  color=#0000ff><FONT size=2> <SPAN class=146403317-02122002> : <FONT 
  size=3><EM><FONT color=#737373>Mandrake 9.0, Kernel 
  2.4.19-16</FONT></EM><BR></FONT> </SPAN></FONT></FONT></FONT><SPAN 
  class=146403317-02122002> </SPAN><BR>And if yes how did you set the snmp 
  service checks ? What added software is needed on your server ? <SPAN 
  class=146403317-02122002><FONT face=Arial color=#0000ff 
  size=2> </FONT></SPAN></DIV>
  <DIV><SPAN class=146403317-02122002>    <FONT face=Arial 
  color=#0000ff size=2>All ucd-snmp stuff</FONT> <FONT face=Arial 
  color=#0000ff size=2>: <FONT size=3><EM><FONT 
  color=#737373>SNMP:</FONT></EM><BR><FONT 
  color=#737373><I>                    libsnmp0-4.2.3-4mdk</FONT></FONT></I><BR><FONT 
  color=#737373><I><FONT 
  size=3>                    ucd-snmp-4.2.3-4mdk</FONT></FONT></I><BR><FONT 
  color=#737373><I><FONT 
  size=3>                    ucd-snmp-utils-4.2.3-4mdk</FONT></FONT></I><BR></FONT></SPAN><BR>And 
  how can we get informations according to the snmp services available on a 3640 
  router ? <SPAN class=146403317-02122002><FONT face=Arial color=#0000ff 
  size=2> </FONT></SPAN></DIV>
  <DIV><SPAN class=146403317-02122002>    <FONT face=Arial 
  color=#0000ff size=2>By queries against the MIB (OID or plain text if you have 
  the Cisco-MIBS on your Linux box in /usr/share/snmp/mibs/ 
  )</FONT> </SPAN></DIV>
  <DIV><SPAN class=146403317-02122002></SPAN><SPAN 
  class=146403317-02122002><FONT face=Arial color=#0000ff 
  size=2> </FONT></SPAN></DIV>
  <DIV><SPAN class=146403317-02122002>    </SPAN></DIV>
  <DIV><SPAN class=146403317-02122002>    <FONT face=Arial 
  color=#0000ff size=2>To test your snmp installation (UCD-SNMP, not Nagios 
  scripts) just issue the following (logged on as user 
  nagios):</FONT></SPAN></DIV>
  <DIV><SPAN class=146403317-02122002><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=146403317-02122002>        
  <FONT face=Arial color=#0000ff size=2>snmpwalk myroutername myROcommunity 
  system</FONT></SPAN></DIV>
  <DIV><SPAN class=146403317-02122002><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=146403317-02122002>        
  <FONT face=Arial color=#0000ff size=2>where myroutername is the DNS FQDN 
  router name, or use the management ip address </FONT></SPAN></DIV>
  <DIV><SPAN class=146403317-02122002>        
  <FONT face=Arial color=#0000ff size=2>where myROcommunity is the SNMP 
  Read-Only comunity (very often set with the default string: 
  public)</FONT></SPAN></DIV>
  <DIV><SPAN class=146403317-02122002>        
  <FONT face=Arial color=#0000ff size=2>where system is the start of the system 
  MIB tree (to have the full picture don't even use system, just 
  do:</FONT></SPAN></DIV>
  <DIV><SPAN 
  class=146403317-02122002>            
  <FONT face=Arial color=#0000ff size=2>snmpwalk myrouter myROcummunity | 
  more</FONT></SPAN></DIV>
  <DIV><SPAN class=146403317-02122002> </SPAN><BR>Thanks for your 
  help <SPAN class=146403317-02122002><FONT face=Arial color=#0000ff 
  size=2> </FONT></SPAN></DIV>
  <DIV><SPAN class=146403317-02122002>    <FONT face=Arial 
  color=#0000ff size=2>You are welcome !</FONT> </SPAN><BR>Regards 
  <BR>Pascal Miquet <BR><BR>Le lun 02/12/2002 à 15:36, Pascal Wessel a écrit : 
  </DIV>
  <BLOCKQUOTE><PRE><FONT color=#737373><I>Nagios gives me warning when snmp_check 'ing for Cisco 3640 CPU load /</FONT></I>
<FONT color=#737373><I>IOS is (C3640-IK9O3S-M), Version 12.2(10a) but the CPU load is below my</FONT></I>
<FONT color=#737373><I>Warning threshold.</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>When launched from the command-line with verbose output:</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>[libexec]# ./check_snmp -v -t 10 -H 192.168.1.1 -o</FONT></I>
<FONT color=#737373><I>.1.3.6.1.4.1.9.2.1.57.0,.1.3.6.1.4.1.9.2.1.58.0 -C publicro -w '60,69',</FONT></I>
<FONT color=#737373><I>-c</FONT></I>
<FONT color=#737373><I> '70,80' -l 'CPU usage 1min/5min' -D ' / '</FONT></I>
<FONT color=#737373><I>/usr/bin/snmpget -m ALL -v 1 -c publicro 192.168.1.1:161</FONT></I>
<FONT color=#737373><I>.1.3.6.1.4.1.9.2.1.57.0 .1.3.6.1.4.1.9.2.1.58.0</FONT></I>
<FONT color=#737373><I>enterprises.9.2.1.57.0 = 4</FONT></I>
<FONT color=#737373><I>enterprises.9.2.1.58.0 = 3</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>CPU usage 1min/5min WARNING - *4* / *3*</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>As you can see.. (and if I understood the syntax)</FONT></I>
<FONT color=#737373><I>Warning status should be triggered when the CPU load is between 60 and</FONT></I>
<FONT color=#737373><I>69%</FONT></I>
<FONT color=#737373><I>Critical status should be triggered when the router CPU is between 70 to</FONT></I>
<FONT color=#737373><I>80%</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>#----</FONT></I>
<FONT color=#737373><I>My question is: why this check reports WARNING as my router CPU load (4%</FONT></I>
<FONT color=#737373><I>last minute and 3% last 5 min) is below the WARNING threshold ?</FONT></I>
<FONT color=#737373><I>#----</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>My Nagios system installation is as follows:</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>System Intel i686, Mandrake 9.0, Kernel 2.4.19-16</FONT></I>
<FONT color=#737373><I>NAGIOS: Nagios 1.0b6 </FONT></I>
<FONT color=#737373><I>Plugins: nagios-plugins-200211131100</FONT></I>
<FONT color=#737373><I>Check_snmp: Revision: 1.17</FONT></I>
<FONT color=#737373><I>SNMP:</FONT></I>
<FONT color=#737373><I>     libsnmp0-4.2.3-4mdk</FONT></I>
<FONT color=#737373><I>     ucd-snmp-4.2.3-4mdk</FONT></I>
<FONT color=#737373><I>     ucd-snmp-utils-4.2.3-4mdk</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>Below a snip of my "cfg file</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>#--- hosts.cfg for myrouter</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>define host {</FONT></I>
<FONT color=#737373><I>name                                         generic-host     </FONT></I>
<FONT color=#737373><I>notifications_enabled                1                ; Host notifications</FONT></I>
<FONT color=#737373><I>are enabled</FONT></I>
<FONT color=#737373><I>event_handler_enabled                1                ; Host event handler is</FONT></I>
<FONT color=#737373><I>enabled</FONT></I>
<FONT color=#737373><I>flap_detection_enabled               1                ; Flap detection is</FONT></I>
<FONT color=#737373><I>enabled</FONT></I>
<FONT color=#737373><I>process_perf_data                    1                ; Process performance</FONT></I>
<FONT color=#737373><I>data</FONT></I>
<FONT color=#737373><I>retain_status_information            1                ; Retain status</FONT></I>
<FONT color=#737373><I>information across program restarts</FONT></I>
<FONT color=#737373><I>retain_nonstatus_information         1                ; Retain non-status</FONT></I>
<FONT color=#737373><I>information across program restarts</FONT></I>
<FONT color=#737373><I>max_check_attempts                   10</FONT></I>
<FONT color=#737373><I>register                       0                ; DONT REGISTER THIS</FONT></I>
<FONT color=#737373><I>DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!</FONT></I>
<FONT color=#737373><I>}</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>define host {</FONT></I>
<FONT color=#737373><I>use                                          generic-host             ; Name</FONT></I>
<FONT color=#737373><I>of host template to use</FONT></I>
<FONT color=#737373><I>host_name                            myrouter</FONT></I>
<FONT color=#737373><I>alias                                        Router Gva Coulou -6</FONT></I>
<FONT color=#737373><I>address                                      192.168.1.1</FONT></I>
<FONT color=#737373><I>check_command                        check-host-alive</FONT></I>
<FONT color=#737373><I>notification_interval                60</FONT></I>
<FONT color=#737373><I>notification_period                  24x7</FONT></I>
<FONT color=#737373><I>notification_options                 d,u,r</FONT></I>
<FONT color=#737373><I>}</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>#--- services.cfg</FONT></I>
<FONT color=#737373><I>define service {</FONT></I>
<FONT color=#737373><I>name                                         generic-service  ; </FONT></I>
<FONT color=#737373><I>active_checks_enabled                1        ; Active service checks are</FONT></I>
<FONT color=#737373><I>enabled</FONT></I>
<FONT color=#737373><I>passive_checks_enabled               1        ; Passive service checks are</FONT></I>
<FONT color=#737373><I>enabled/accepted</FONT></I>
<FONT color=#737373><I>parallelize_check                    1        ; Active service checks should</FONT></I>
<FONT color=#737373><I>be parallelized </FONT></I>
<FONT color=#737373><I>obsess_over_service                  1        ; We should obsess over this</FONT></I>
<FONT color=#737373><I>service (if necessary)</FONT></I>
<FONT color=#737373><I>check_freshness                      0        ; Default is to NOT check</FONT></I>
<FONT color=#737373><I>service 'freshness'</FONT></I>
<FONT color=#737373><I>notifications_enabled                1        ; Service notifications are</FONT></I>
<FONT color=#737373><I>enabled</FONT></I>
<FONT color=#737373><I>event_handler_enabled                1        ; Service event handler is</FONT></I>
<FONT color=#737373><I>enabled</FONT></I>
<FONT color=#737373><I>flap_detection_enabled               1        ; Flap detection is enabled</FONT></I>
<FONT color=#737373><I>process_perf_data                    1        ; Process performance data</FONT></I>
<FONT color=#737373><I>retain_status_information            1        ; Retain status information</FONT></I>
<FONT color=#737373><I>across program restarts</FONT></I>
<FONT color=#737373><I>retain_nonstatus_information         1        ; Retain non-status information</FONT></I>
<FONT color=#737373><I>across program restarts</FONT></I>
<FONT color=#737373><I>normal_check_interval                5</FONT></I>
<FONT color=#737373><I>retry_check_interval                 2</FONT></I>
<FONT color=#737373><I>notification_period                  24x7</FONT></I>
<FONT color=#737373><I>notification_options                 u,c,r</FONT></I>
<FONT color=#737373><I>register                                     0        ; DONT REGISTER THIS</FONT></I>
<FONT color=#737373><I>DEFINITION</FONT></I>
<FONT color=#737373><I>}</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>define service{</FONT></I>
<FONT color=#737373><I>use                                          generic-service</FONT></I>
<FONT color=#737373><I>host_name                            myrouter</FONT></I>
<FONT color=#737373><I>service_description                  CPU</FONT></I>
<FONT color=#737373><I>is_volatile                                  0</FONT></I>
<FONT color=#737373><I>check_period                         24x7</FONT></I>
<FONT color=#737373><I>max_check_attempts                   3</FONT></I>
<FONT color=#737373><I>retry_check_interval                 1</FONT></I>
<FONT color=#737373><I>contact_groups                       router-admins</FONT></I>
<FONT color=#737373><I>notification_interval                120</FONT></I>
<FONT color=#737373><I>notification_period                  24x7</FONT></I>
<FONT color=#737373><I>check_command</FONT></I>
<FONT color=#737373><I>check_cisco_cpu!publicro!60!69!70!80</FONT></I>
<FONT color=#737373><I>}</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>#--- checkcommands.cfg</FONT></I>
<FONT color=#737373><I># 'check_snmp' generic command definition</FONT></I>
<FONT color=#737373><I>define command{</FONT></I>
<FONT color=#737373><I>command_name    check_snmp</FONT></I>
<FONT color=#737373><I>command_line    $USER1$/check_snmp -t 10 -H $HOSTADDRESS$ -C $ARG1$</FONT></I>
<FONT color=#737373><I>$ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$ $ARG8$ $ARG9$</FONT></I>
<FONT color=#737373><I>}</FONT></I>
<FONT color=#737373><I># check_cisco_cpu: checks router CPU-usage</FONT></I>
<FONT color=#737373><I># Syntax</FONT></I>
<FONT color=#737373><I>!Hostname!Community!WARN-1min-%!WARN-5min-%!CRIT-1min-%!CRIT-5min-%</FONT></I>
<FONT color=#737373><I>define command{</FONT></I>
<FONT color=#737373><I>command_name    check_cisco_cpu</FONT></I>
<FONT color=#737373><I>command_line    $USER1$/check_snmp -t 10 -H $HOSTADDRESS$</FONT></I>
<FONT color=#737373><I>-o.1.3.6.1.4.1.9.2.1.57.0,.1.3.6.1.4.1.9.2.1.58.0 -C $ARG1$ -w</FONT></I>
<FONT color=#737373><I>:$ARG2$,:$ARG3$ -c :</FONT></I>
<FONT color=#737373><I>$ARG4$,:$ARG5$ -l 'CPU usage 1min/5min' -D ' / '</FONT></I>
<FONT color=#737373><I>}</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>Btw, by looking at the code in check_snmp.c I'm wondering .</FONT></I>
<FONT color=#737373><I>Is there a problem with : #define mark(a) ((a)!=0?"*":"") in</FONT></I>
<FONT color=#737373><I>check_snmp.c ??? Or are my parms so bad ? :-o</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>Thanks for your kind help.</FONT></I>
<FONT color=#737373><I>Warm regards,</FONT></I>
<FONT color=#737373><I>Pascal</FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I></FONT></I>
<FONT color=#737373><I>-------------------------------------------------------</FONT></I>
<FONT color=#737373><I>This sf.net email is sponsored by:ThinkGeek</FONT></I>
<FONT color=#737373><I>Welcome to geek heaven.</FONT></I>
<FONT color=#737373><I>http://thinkgeek.com/sf</FONT></I>
<FONT color=#737373><I>_______________________________________________</FONT></I>
<FONT color=#737373><I>Nagios-users mailing list</FONT></I>
<FONT color=#737373><I>Nagios-users@lists.sourceforge.net</FONT></I></PRE></BLOCKQUOTE><A 
  href="https://lists.sourceforge.net/lists/listinfo/nagios-users"><I>https://lists.sourceforge.net/lists/listinfo/nagios-users</I></A> 

  <BLOCKQUOTE><PRE></PRE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>