Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
TetraWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Trainning@sandhar-nagios
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
''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.'' <pre> <nowiki> Nagios Server Important files ο¬ Contact.cfg ο¬ Template.cfg ο¬ Command.cfg ο¬ Linuxbox.cfg Contact.cfg ο¬ This File is use to define the contact and contact groups for the mailing perspective. ο¬ Ex: define contact{ contact_name oracleadmin use generic-contact alias Ashish Awathi Oracle Admin email ashish.awasthi@sandhar.in } ο¬ Ex: define contactgroup{ contactgroup_name oracle alias Oracle Team to get Information members oracleadmin,oracleadmin1,dba-group } ο¬ We use contact groups for the mailling but for that must have to define contact. Template.cfg ο¬ This file is use to define the templates to be used for the contacts, host, service and to define hostgroups. ο¬ Ex: define service{ ο¬ name generic-service ; The 'name' of this service template ο¬ use srv-pnp ο¬ active_checks_enabled 1 ; Active service checks are enabled ο¬ passive_checks_enabled 1 ; Passive service checks are enabled/accepted ο¬ parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems) ο¬ obsess_over_service 1 ; We should obsess over this service (if necessary) ο¬ check_freshness 0 ; Default is to NOT check service 'freshness' ο¬ notifications_enabled 1 ; Service notifications are enabled ο¬ event_handler_enabled 1 ; Service event handler is enabled ο¬ flap_detection_enabled 1 ; Flap detection is enabled ο¬ failure_prediction_enabled 1 ; Failure prediction is enabled ο¬ process_perf_data 1 ; Process performance data ο¬ retain_status_information 1 ; Retain status information across program restarts ο¬ retain_nonstatus_information 1 ; Retain non-status information across program restarts ο¬ is_volatile 0 ; The service is not volatile ο¬ check_period 24x7 ; The service can be checked at any time of the day ο¬ max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state ο¬ normal_check_interval 10 ; Check the service every 10 minutes under normal conditions ο¬ retry_check_interval 2 ; Re-check the service every two minutes until a hard state can be determined ο¬ contact_groups admins ; Notifications get sent out to everyone in the 'admins' group ο¬ notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events ο¬ notification_interval 60 ; Re-notify about service problems every hour ο¬ notification_period 24x7 ; Notifications can be sent out at any time ο¬ register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! Command.cfg ο¬ This file is used to define the specific commands to be called with nrpe or directly by its name, it can be a command for the remote client as well as for the local also. ο¬ Ex: define command{ command_name check_oracle_health_modified command_line /usr/local/nagios/libexec/check_oracle_health_shell --mode $ARG1$ --connect $ARG2$ --user $ARG3$ --password $ARG4$ --warning $ARG5$ --critical $ARG6$ } Linuxbox.cfg ο¬ This is the main configuration file from where all the information from different respective file were called to produce the output on dashboard. ο¬ Ex: define host{ use linux-server host_name stl-BItest alias stl-BItest address 172.17.16.19 hostgroups sandhar-oracle-server } Service defination dir ο¬ The directory service is the place where all the required service to be visible on dashboard were defined in a single file of the respective host. ο¬ Ex: define service{ use generic-log-service host_name stl-proddb1 service_description Oracle Database status contact_groups oracle notification_options w,u,c,r check_command check_nrpe!check_databases } Client Configuration file ο¬ Nrpe.cfg ο¬ This is the only file responsible to generate the query as a command and give the output from the client server to nagios server via nrpe/nsclient++ ο¬ Ex: command[check_load]=/usr/local/nagios/libexe c/check_load -r -w 10 -c 15 Monitoring Perspective ο¬ This is the main Overview of Dashboard. Explaination ο¬ In the Dash Board Everything which is red is the visual symbol of Critical either host or service. ο¬ Yellow is the visual Symbol of Warning level. ο¬ Green is the symbol of OK. ο¬ We must work on warning level so that issue not raised to critical level. Explaination ο¬ The mail alerts of all the host and respective service will generated on the bases of warning, critical, unknown and recovery. ο¬ If seeing and critical or warning service on the dash board acknowledge it which also generates a mail of acknowledgment which reflects that the issue is being taken care by monitoring team and it will not generate any further critical or warning mail until the issue got recovered, once it recover generate the recovery mail. Explaination ο¬ Acknowledgment process. Explaination ο¬ Click on Hammer. Explaination ο¬ Write a Comment and save the Acknowledgment Installation & Configuration of npre on client machine ο¬ On solaris server. ο¬ Install the package SYMCnrpe-sparc-1.4.15b.pkg.gz ο¬ Copy the /usr/local/nagios to /tmp/ ο¬ Remove the nrpe package. ο¬ Now copy the /tmp/nagios to /usr/local/ ο¬ Enter the below entries allowed_hosts=127.0.0.1,172.17.16.3 ο¬ To run nrpe as standalone process /usr/local/nagios/bin/nrpe -n -c /usr/local/nagios/etc/nrpe.cfg -d ο¬ To restart pkill nrpe; /usr/local/nagios/bin/nrpe -n -c /usr/local/nagios/etc/nrpe.cfg -d Installation & Configuration of npre on client machine ο¬ On Windows ο¬ Install nsclient++.exe ο¬ Look for allowed host put the information of nagios server. 172.17.16.3. ο¬ Restart the nsclient. To Add SNMP device ο¬ On nagios side. ο¬ Run snmpwalk to check whether snmp device is able to listen or not snmpwalk -v2c -c public 172.17.17.23 snmpwalk -vversion -c string host-address. ο¬ Check for the available up links. To Add SNMP device ο¬ Now map the up link status as already defined command in command.cfg. ο¬ /usr/local/nagios/libexec/check_ifoperstatus -H $HOSTADDRESS$ -C $ARG1$ -k $ARG2$ ο¬ Use the parameter accordingly in the service file of the required host like. define service{ use generic-service host_name Switch-172_17_17_23 service_description Link status Interface 2 check_command check_ifoperstatus!public!2 } ο¬ Above is defined to check the status of link 2. THANKS Amit Srivastava Linux Engineer L2 Feel free to call or drop mail for any clarification or Issue on service@tetrain.com 011-47521743/44/45 </nowiki> </pre>
Summary:
Please note that all contributions to TetraWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
TetraWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)