How to solve monitoring problems
with Nagios
Jack Chu
gouldchu@gmail.com
Introduction & Agenda
• Different aspect of essence of monitoring"
• Trick to make a plugin pass through
firewall"
• O...
Essence of monitoring
Essence of monitoring
A brief definition:"
"
To alert you something abnormal you care
4
Essence of monitoring
Let’s try to imagine:"
a beautiful girl……"
5
Essence of monitoring
6
What do we learn from contacting this girl?
Connection should be built first.
More trust more ...
Essence of monitoring
To some degree, to establish host and service
monitoring is similar to contact a girl.
7
• To bu...
Something to remember
• Nagios Exchange - a treasury"
• Try to search with different key words
combination:"
Nagios AB...
Make a plugin to pass through
firewall
Make a plugin to pass through firewall
10
Start to think
"
Can Nagios monitor this?"
"
How can we monitor this with Nagios?
11
Start to think more
• How can we find ISP switching?
12
• Is there any plugin in Nagios exchange
able to do this?
• W...
Tweak the plugin
Original script:"
"
#! /bin/bash
PROG="/usr/bin/traceroute -n"
GREP=“/bin/egrep"
HOST=$1
FILE=/tmp...
Tweak the plugin
Modified script:"
"
#! /bin/bash
PROG="sudo /usr/bin/traceroute -n -T"
GREP=“/bin/egrep"
HOST=$1
F...
Modify /etc/sudoers
To grant root privilege and avoid requiretty
error:"
"
nagios ALL=(ALL) NOPASSWD: /usr/local/
nag...
Quote for you
"
“An idea is nothing more or less than a
new combination of old elements.”"
"
~James Webb Young"
16
Overview of NSClient++ config
Overview of NSClient++ config
• The structure of nsclient.ini"
• Enable module + finish the setting for
individual modu...
“Indirect check” with NSClient++: to build
a Windows proxy
• Enable NRPEServer and NRPEClient module"
• Allow Nagios ac...
Monitoring usage of Windows
cluster shared disk
Monitoring usage of Windows cluster
shared disk
• Scenario"
• Problems of traditional monitoring way
21
Monitoring usage of Windows cluster shared
disk - Scenario/Traditional ways/Problems
22
Monitoring usage of Windows cluster
shared disk - Better solution
23
• What we hope our solution can do:
automatic
• ...
24
Monitoring usage of Windows cluster
shared disk
Config on nsclient.ini
• Config at Windows proxy"
• Config at Nodes"
• Config at shared disk
25
Make NSClient++ daemon be a part of
Windows cluster resource
• At C:Program Files of any cluster node,
copy the NSClien...
Sample command on Nagios
define command{
command_name check_nrpe_drivesize
command_line /usr/local/nagios/libexec/
che...
Sample service on Nagios
define service {
use generic-service
host_name ms_cluster_host_01
service_description Shared ...
What do we learn?
"
• A different aspect to watch essence of
monitoring"
• Trick to make a plugin pass through firewal...
Conclusion
• Keeping gathering and masticating
materials for your Nagios monitoring
• Learn from anything to enhance yo...
The End
Jack Chu
gouldchu@gmail.com
of 31

Nagios Conference 2014 - Jack Chu - How to Think With Nagios to Solve Monitoring Problems

Jack Chu's presentation on How to Think With Nagios to Solve Monitoring Problems. The presentation was given during the Nagios World Conference North America held Oct 13th - Oct 16th, 2014 in Saint Paul, MN. For more information on the conference (including photos and videos), visit: http://go.nagios.com/conference
Published on: Mar 3, 2016
Published in: Technology      
Source: www.slideshare.net


Transcripts - Nagios Conference 2014 - Jack Chu - How to Think With Nagios to Solve Monitoring Problems

  • 1. How to solve monitoring problems with Nagios Jack Chu gouldchu@gmail.com
  • 2. Introduction & Agenda • Different aspect of essence of monitoring" • Trick to make a plugin pass through firewall" • Overview of NSClient++ config file" • Monitoring usage of Windows cluster shared disk 2
  • 3. Essence of monitoring
  • 4. Essence of monitoring A brief definition:" " To alert you something abnormal you care 4
  • 5. Essence of monitoring Let’s try to imagine:" a beautiful girl……" 5
  • 6. Essence of monitoring 6 What do we learn from contacting this girl? Connection should be built first. More trust more information. The effects of different languages may differ.
  • 7. Essence of monitoring To some degree, to establish host and service monitoring is similar to contact a girl. 7 • To build connection or even trust before monitoring." • To evaluate different ways of connection" • To ask right questions:" Detective Spooner: Is there something you want tell me? " Dr. Lanning: I'm sorry. My responses are limited. You must ask the right questions.
  • 8. Something to remember • Nagios Exchange - a treasury" • Try to search with different key words combination:" Nagios ABC" Nagios monitor ABC" monitor ABC" “other tool” ABC" (anything about) ABC" ……" 8
  • 9. Make a plugin to pass through firewall
  • 10. Make a plugin to pass through firewall 10
  • 11. Start to think " Can Nagios monitor this?" " How can we monitor this with Nagios? 11
  • 12. Start to think more • How can we find ISP switching? 12 • Is there any plugin in Nagios exchange able to do this? • When plugin is blocked, what can we do? • Let’s imagine again!
  • 13. Tweak the plugin Original script:" " #! /bin/bash PROG="/usr/bin/traceroute -n" GREP=“/bin/egrep" HOST=$1 FILE=/tmp/check_tracert-`date +%N`.txt START="$2" LAST="$3" 13
  • 14. Tweak the plugin Modified script:" " #! /bin/bash PROG="sudo /usr/bin/traceroute -n -T" GREP=“/bin/egrep" HOST=$1 FILE=/tmp/check_tracert-`date +%N`.txt START="$2" LAST="$3" 14
  • 15. Modify /etc/sudoers To grant root privilege and avoid requiretty error:" " nagios ALL=(ALL) NOPASSWD: /usr/local/ nagios/libexec/check_2hoptraceroutetcp.sh ...... #Defaults requiretty 15
  • 16. Quote for you " “An idea is nothing more or less than a new combination of old elements.”" " ~James Webb Young" 16
  • 17. Overview of NSClient++ config
  • 18. Overview of NSClient++ config • The structure of nsclient.ini" • Enable module + finish the setting for individual module + define command or script + restart NSClient++ daemon" • check_nrpe -H 10.1.2.3 -p 5666 -c command (we define at nsclient.ini) 18
  • 19. “Indirect check” with NSClient++: to build a Windows proxy • Enable NRPEServer and NRPEClient module" • Allow Nagios access at [/settings/NRPE/server]" • Define the command at [/settings/external scripts/scripts]" • check_abc=nscp nrpe -H [remote host IP] -P 5666 -c get_cpu [remote command] 19
  • 20. Monitoring usage of Windows cluster shared disk
  • 21. Monitoring usage of Windows cluster shared disk • Scenario" • Problems of traditional monitoring way 21
  • 22. Monitoring usage of Windows cluster shared disk - Scenario/Traditional ways/Problems 22
  • 23. Monitoring usage of Windows cluster shared disk - Better solution 23 • What we hope our solution can do: automatic • What are the pieces required for this puzzle? ✴ NSClient++ located at proxy, nodes, and shared disk" ✴ NSClient++ daemon as a part of Windows cluster resource
  • 24. 24 Monitoring usage of Windows cluster shared disk
  • 25. Config on nsclient.ini • Config at Windows proxy" • Config at Nodes" • Config at shared disk 25
  • 26. Make NSClient++ daemon be a part of Windows cluster resource • At C:Program Files of any cluster node, copy the NSClient++ folder to the shared disk." • How to make NSClient++ daemon be a part of Windows cluster resource (step by step) 26
  • 27. Sample command on Nagios define command{ command_name check_nrpe_drivesize command_line /usr/local/nagios/libexec/ check_nrpe -H $HOSTADDRESS$ -p 5666 -c check_shared_drive } 27
  • 28. Sample service on Nagios define service { use generic-service host_name ms_cluster_host_01 service_description Shared Disk Usage check_command check_nrpe_drivesize servicegroups windows } 28
  • 29. What do we learn? " • A different aspect to watch essence of monitoring" • Trick to make a plugin pass through firewall" • NSClient++ config file" • How to monitor Windows cluster shared disk via proxy" " " 29
  • 30. Conclusion • Keeping gathering and masticating materials for your Nagios monitoring • Learn from anything to enhance your monitoring capacity. • To solve problems is like to collect jewels needed to make a necklace. • Nagios is the most essential jewel to make your own necklace! 30
  • 31. The End Jack Chu gouldchu@gmail.com

Related Documents