<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tetrain.com/index.php?action=history&amp;feed=atom&amp;title=Trainning%40sandhar-nagios</id>
	<title>Trainning@sandhar-nagios - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tetrain.com/index.php?action=history&amp;feed=atom&amp;title=Trainning%40sandhar-nagios"/>
	<link rel="alternate" type="text/html" href="https://wiki.tetrain.com/index.php?title=Trainning@sandhar-nagios&amp;action=history"/>
	<updated>2026-07-27T11:11:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.tetrain.com/index.php?title=Trainning@sandhar-nagios&amp;diff=4359&amp;oldid=prev</id>
		<title>Admin: Auto-created from uploaded PDF text extraction</title>
		<link rel="alternate" type="text/html" href="https://wiki.tetrain.com/index.php?title=Trainning@sandhar-nagios&amp;diff=4359&amp;oldid=prev"/>
		<updated>2026-07-26T16:27:11Z</updated>

		<summary type="html">&lt;p&gt;Auto-created from uploaded PDF text extraction&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;Auto-generated from the uploaded PDF [[:File:Trainning@sandhar-nagios.pdf|Trainning@sandhar-nagios.pdf]]. This is an extracted-text rendering for searchability; see the original PDF for exact formatting, diagrams, tables, and images.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Nagios Server Important files&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
  Contact.cfg&lt;br /&gt;
 &lt;br /&gt;
  Template.cfg&lt;br /&gt;
 &lt;br /&gt;
  Command.cfg&lt;br /&gt;
 &lt;br /&gt;
  Linuxbox.cfg&lt;br /&gt;
&lt;br /&gt;
                               Contact.cfg&lt;br /&gt;
&lt;br /&gt;
    This File is use to define the contact and contact groups for the mailing&lt;br /&gt;
    perspective.&lt;br /&gt;
&lt;br /&gt;
    Ex: define contact{&lt;br /&gt;
       contact_name                oracleadmin&lt;br /&gt;
       use                     generic-contact&lt;br /&gt;
       alias                   Ashish Awathi Oracle Admin&lt;br /&gt;
       email                   ashish.awasthi@sandhar.in&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
    Ex: define contactgroup{&lt;br /&gt;
       contactgroup_name         oracle&lt;br /&gt;
       alias              Oracle Team to get Information&lt;br /&gt;
       members               oracleadmin,oracleadmin1,dba-group&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
    We use contact groups for the mailling but for that must have to define contact.&lt;br /&gt;
&lt;br /&gt;
                                                       Template.cfg&lt;br /&gt;
&lt;br /&gt;
    This file is use to define the templates to be used for the contacts, host, service and to define hostgroups.&lt;br /&gt;
&lt;br /&gt;
    Ex: define service{&lt;br /&gt;
&lt;br /&gt;
         name                     generic-service          ; The &amp;#039;name&amp;#039; of this service template&lt;br /&gt;
&lt;br /&gt;
         use                     srv-pnp&lt;br /&gt;
&lt;br /&gt;
         active_checks_enabled                1               ; Active service checks are enabled&lt;br /&gt;
&lt;br /&gt;
         passive_checks_enabled                   1            ; Passive service checks are enabled/accepted&lt;br /&gt;
&lt;br /&gt;
         parallelize_check            1                   ; Active service checks should be parallelized (disabling this can lead to major&lt;br /&gt;
    performance problems)&lt;br /&gt;
&lt;br /&gt;
         obsess_over_service                  1             ; We should obsess over this service (if necessary)&lt;br /&gt;
&lt;br /&gt;
         check_freshness               0                   ; Default is to NOT check service &amp;#039;freshness&amp;#039;&lt;br /&gt;
&lt;br /&gt;
         notifications_enabled            1                ; Service notifications are enabled&lt;br /&gt;
&lt;br /&gt;
         event_handler_enabled                1               ; Service event handler is enabled&lt;br /&gt;
&lt;br /&gt;
         flap_detection_enabled               1              ; Flap detection is enabled&lt;br /&gt;
&lt;br /&gt;
         failure_prediction_enabled           1              ; Failure prediction is enabled&lt;br /&gt;
&lt;br /&gt;
         process_perf_data                1                ; Process performance data&lt;br /&gt;
&lt;br /&gt;
         retain_status_information            1              ; Retain status information across program restarts&lt;br /&gt;
&lt;br /&gt;
         retain_nonstatus_information             1            ; Retain non-status information across program restarts&lt;br /&gt;
&lt;br /&gt;
         is_volatile              0                   ; The service is not volatile&lt;br /&gt;
&lt;br /&gt;
         check_period                 24x7                 ; The service can be checked at any time of the day&lt;br /&gt;
&lt;br /&gt;
         max_check_attempts                    3             ; Re-check the service up to 3 times in order to determine its final (hard) state&lt;br /&gt;
&lt;br /&gt;
         normal_check_interval                10             ; Check the service every 10 minutes under normal conditions&lt;br /&gt;
&lt;br /&gt;
         retry_check_interval          2                   ; Re-check the service every two minutes until a hard state can be determined&lt;br /&gt;
&lt;br /&gt;
         contact_groups               admins                 ; Notifications get sent out to everyone in the &amp;#039;admins&amp;#039; group&lt;br /&gt;
&lt;br /&gt;
         notification_options         w,u,c,r              ; Send notifications about warning, unknown, critical, and recovery events&lt;br /&gt;
&lt;br /&gt;
         notification_interval        60                  ; Re-notify about service problems every hour&lt;br /&gt;
&lt;br /&gt;
         notification_period          24x7                 ; Notifications can be sent out at any time&lt;br /&gt;
&lt;br /&gt;
         register                 0                   ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!&lt;br /&gt;
&lt;br /&gt;
                   Command.cfg&lt;br /&gt;
&lt;br /&gt;
    This file is used to define the specific commands to be&lt;br /&gt;
    called with nrpe or directly by its name, it can be a&lt;br /&gt;
    command for the remote client as well as for the local&lt;br /&gt;
    also.&lt;br /&gt;
&lt;br /&gt;
    Ex: define command{&lt;br /&gt;
       command_name       check_oracle_health_modified&lt;br /&gt;
       command_line&lt;br /&gt;
    /usr/local/nagios/libexec/check_oracle_health_shell&lt;br /&gt;
    --mode $ARG1$ --connect $ARG2$ --user $ARG3$&lt;br /&gt;
    --password $ARG4$ --warning $ARG5$ --critical&lt;br /&gt;
    $ARG6$         }&lt;br /&gt;
&lt;br /&gt;
                          Linuxbox.cfg&lt;br /&gt;
&lt;br /&gt;
    This is the main configuration file from where all the information&lt;br /&gt;
    from different respective file were called to produce the output&lt;br /&gt;
    on dashboard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Ex: define host{&lt;br /&gt;
             use          linux-server&lt;br /&gt;
             host_name        stl-BItest&lt;br /&gt;
             alias        stl-BItest&lt;br /&gt;
             address        172.17.16.19&lt;br /&gt;
             hostgroups      sandhar-oracle-server&lt;br /&gt;
         }&lt;br /&gt;
&lt;br /&gt;
                   Service defination dir&lt;br /&gt;
&lt;br /&gt;
    The directory service is the place where all the required service to be&lt;br /&gt;
    visible on dashboard were defined in a single file of the respective&lt;br /&gt;
    host.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Ex: define service{&lt;br /&gt;
           use            generic-log-service&lt;br /&gt;
           host_name         stl-proddb1&lt;br /&gt;
           service_description Oracle Database status&lt;br /&gt;
           contact_groups         oracle&lt;br /&gt;
           notification_options   w,u,c,r&lt;br /&gt;
           check_command          check_nrpe!check_databases&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
           Client Configuration file&lt;br /&gt;
&lt;br /&gt;
    Nrpe.cfg&lt;br /&gt;
&lt;br /&gt;
    This is the only file responsible to generate the&lt;br /&gt;
    query as a command and give the output from&lt;br /&gt;
    the client server to nagios server via&lt;br /&gt;
    nrpe/nsclient++&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Ex:&lt;br /&gt;
    command[check_load]=/usr/local/nagios/libexe&lt;br /&gt;
    c/check_load -r -w 10 -c 15&lt;br /&gt;
&lt;br /&gt;
          Monitoring Perspective&lt;br /&gt;
   This is the main Overview of Dashboard.&lt;br /&gt;
&lt;br /&gt;
                  Explaination&lt;br /&gt;
   In the Dash Board Everything which is red is&lt;br /&gt;
    the visual symbol of Critical either host or&lt;br /&gt;
    service.&lt;br /&gt;
&lt;br /&gt;
   Yellow is the visual Symbol of Warning level.&lt;br /&gt;
&lt;br /&gt;
   Green is the symbol of OK.&lt;br /&gt;
   We must work on warning level so that issue&lt;br /&gt;
    not raised to critical level.&lt;br /&gt;
&lt;br /&gt;
                   Explaination&lt;br /&gt;
&lt;br /&gt;
    The mail alerts of all the host and respective&lt;br /&gt;
    service will generated on the bases of warning,&lt;br /&gt;
    critical, unknown and recovery.&lt;br /&gt;
&lt;br /&gt;
    If seeing and critical or warning service on the&lt;br /&gt;
    dash board acknowledge it which also generates&lt;br /&gt;
    a mail of acknowledgment which reflects that the&lt;br /&gt;
    issue is being taken care by monitoring team and&lt;br /&gt;
    it will not generate any further critical or warning&lt;br /&gt;
    mail until the issue got recovered, once it recover&lt;br /&gt;
    generate the recovery mail.&lt;br /&gt;
&lt;br /&gt;
                Explaination&lt;br /&gt;
   Acknowledgment process.&lt;br /&gt;
&lt;br /&gt;
                Explaination&lt;br /&gt;
   Click on Hammer.&lt;br /&gt;
&lt;br /&gt;
                 Explaination&lt;br /&gt;
   Write a Comment and save the Acknowledgment&lt;br /&gt;
&lt;br /&gt;
     Installation &amp;amp; Configuration of npre&lt;br /&gt;
               on client machine&lt;br /&gt;
   On solaris server.&lt;br /&gt;
      Install the package SYMCnrpe-sparc-1.4.15b.pkg.gz&lt;br /&gt;
     Copy the /usr/local/nagios to /tmp/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     Remove the nrpe package.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     Now copy the /tmp/nagios to /usr/local/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     Enter the below entries&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    allowed_hosts=127.0.0.1,172.17.16.3&lt;br /&gt;
     To run nrpe as standalone process&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/usr/local/nagios/bin/nrpe -n -c /usr/local/nagios/etc/nrpe.cfg -d&lt;br /&gt;
   To restart pkill nrpe;&lt;br /&gt;
/usr/local/nagios/bin/nrpe -n -c /usr/local/nagios/etc/nrpe.cfg -d&lt;br /&gt;
&lt;br /&gt;
Installation &amp;amp; Configuration of npre&lt;br /&gt;
          on client machine&lt;br /&gt;
&lt;br /&gt;
    On Windows&lt;br /&gt;
    &lt;br /&gt;
        Install nsclient++.exe&lt;br /&gt;
    &lt;br /&gt;
        Look for allowed host put the information of nagios&lt;br /&gt;
        server. 172.17.16.3.&lt;br /&gt;
    &lt;br /&gt;
        Restart the nsclient.&lt;br /&gt;
&lt;br /&gt;
              To Add SNMP device&lt;br /&gt;
&lt;br /&gt;
    On nagios side.&lt;br /&gt;
    &lt;br /&gt;
        Run snmpwalk to check whether snmp device is&lt;br /&gt;
        able to listen or not&lt;br /&gt;
    snmpwalk -v2c -c public 172.17.17.23&lt;br /&gt;
    snmpwalk -vversion -c string host-address.&lt;br /&gt;
    &lt;br /&gt;
        Check for the available up links.&lt;br /&gt;
&lt;br /&gt;
                 To Add SNMP device&lt;br /&gt;
   Now map the up link status as already defined command in command.cfg.&lt;br /&gt;
&lt;br /&gt;
   /usr/local/nagios/libexec/check_ifoperstatus -H $HOSTADDRESS$ -C&lt;br /&gt;
    $ARG1$ -k $ARG2$&lt;br /&gt;
&lt;br /&gt;
 Use the parameter accordingly in the service file of the required host like.&lt;br /&gt;
define service{&lt;br /&gt;
     use                generic-service&lt;br /&gt;
     host_name             Switch-172_17_17_23&lt;br /&gt;
     service_description      Link status Interface 2&lt;br /&gt;
     check_command              check_ifoperstatus!public!2&lt;br /&gt;
     }&lt;br /&gt;
 Above is defined to check the status of link 2.&lt;br /&gt;
&lt;br /&gt;
                  THANKS&lt;br /&gt;
               Amit Srivastava&lt;br /&gt;
              Linux Engineer L2&lt;br /&gt;
Feel free to call or drop mail for any clarification or Issue on&lt;br /&gt;
                      service@tetrain.com&lt;br /&gt;
                      011-47521743/44/45&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>