{"id":817,"date":"2013-10-30T12:21:49","date_gmt":"2013-10-30T11:21:49","guid":{"rendered":"http:\/\/blog.rabahi.net\/?page_id=817"},"modified":"2014-08-24T14:04:46","modified_gmt":"2014-08-24T12:04:46","slug":"monitoring-survival-guide","status":"publish","type":"page","link":"https:\/\/blog.rabahi.net\/?page_id=817","title":{"rendered":"Monitoring Survival Guide"},"content":{"rendered":"<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#SNMP\"><span class=\"toc_number toc_depth_1\">1<\/span> SNMP<\/a><ul><li><a href=\"#List_all_interfaces\"><span class=\"toc_number toc_depth_2\">1.1<\/span> List all interfaces<\/a><\/li><li><a href=\"#Get_interface_informations\"><span class=\"toc_number toc_depth_2\">1.2<\/span> Get interface informations<\/a><ul><li><a href=\"#Name\"><span class=\"toc_number toc_depth_3\">1.2.1<\/span> Name<\/a><\/li><li><a href=\"#Speed\"><span class=\"toc_number toc_depth_3\">1.2.2<\/span> Speed<\/a><\/li><\/ul><\/li><\/ul><\/li><li><a href=\"#VMWare_vSphere\"><span class=\"toc_number toc_depth_1\">2<\/span> VMWare vSphere<\/a><ul><li><a href=\"#Installation\"><span class=\"toc_number toc_depth_2\">2.1<\/span> Installation<\/a><\/li><li><a href=\"#Configuration\"><span class=\"toc_number toc_depth_2\">2.2<\/span> Configuration<\/a><\/li><\/ul><\/li><li><a href=\"#Smart\"><span class=\"toc_number toc_depth_1\">3<\/span> Smart<\/a><ul><li><a href=\"#Installation-2\"><span class=\"toc_number toc_depth_2\">3.1<\/span> Installation<\/a><\/li><li><a href=\"#Configuration-2\"><span class=\"toc_number toc_depth_2\">3.2<\/span> Configuration<\/a><\/li><li><a href=\"#Read_More\"><span class=\"toc_number toc_depth_2\">3.3<\/span> Read More<\/a><\/li><\/ul><\/li><\/ul><\/div>\n<h1><span id=\"SNMP\">SNMP<\/span><\/h1>\n<h2><span id=\"List_all_interfaces\">List all interfaces<\/span><\/h2>\n<pre lang=\"bash\">\r\nperl check_snmp_int.pl -H MYHOST -C public -n zzzz -v\r\n<\/pre>\n<h2><span id=\"Get_interface_informations\">Get interface informations<\/span><\/h2>\n<h3><span id=\"Name\">Name<\/span><\/h3>\n<pre lang=\"bash\">\r\n# for interface number 1\r\n.\/check_snmp -H MYHOST -C public -o ifName.1\r\n<\/pre>\n<h3><span id=\"Speed\">Speed<\/span><\/h3>\n<pre lang=\"bash\">\r\n# for interface number 1\r\n.\/check_snmp -H MYHOST -C public -o ifSpeed.1\r\n<\/pre>\n<h1><span id=\"VMWare_vSphere\">VMWare vSphere<\/span><\/h1>\n<p>We will use this python script : http:\/\/www.claudiokuenzler.com\/nagios-plugins\/check_esxi_hardware.php#.U_nPs_l_tWU<\/p>\n<h2><span id=\"Installation\">Installation<\/span><\/h2>\n<pre lang=\"bash\">\r\necho \"install pywbem\"\r\nyum -y install pywbem\r\n\r\necho \"download python script\"\r\nwget http:\/\/www.claudiokuenzler.com\/nagios-plugins\/check_esxi_hardware.py -O \/usr\/lib64\/nagios\/plugins\/check_esxi_hardware.py\r\n<\/pre>\n<h2><span id=\"Configuration\">Configuration<\/span><\/h2>\n<p>Set the following command in nagios :<\/p>\n<pre>\r\n# 'check_esxi_hardware' command definition\r\ndefine command{\r\ncommand_name check_esxi_hardware\r\ncommand_line \/usr\/lib\/nagios\/plugins\/check_esxi_hardware.py -H $HOSTADDRESS$ -U $ARG1$ -P $ARG2$\r\n}\r\n<\/pre>\n<p>and the following service:<\/p>\n<pre>\r\n# Check DELL Server hardware\r\ndefine service{\r\nuse generic-service\r\nhost_name esxi2\r\nservice_description Hardware\r\ncheck_command check_esxi_hardware!root!mypass!dell!--perfdata\r\n}\r\n<\/pre>\n<h1><span id=\"Smart\">Smart<\/span><\/h1>\n<h2><span id=\"Installation-2\">Installation<\/span><\/h2>\n<pre lang=\"bash\">\r\necho \"install smartmontools\"\r\nyum -y install smartmontools\r\necho \"download script\"\r\nwget https:\/\/raw.githubusercontent.com\/nicolargo\/nagiosautoinstall\/master\/check_smart.pl -O \/usr\/lib64\/nagios\/plugins\/check_smart.pl\r\n<\/pre>\n<h2><span id=\"Configuration-2\">Configuration<\/span><\/h2>\n<p>Set the following command in nagios :<\/p>\n<pre>\r\ndefine command{\r\ncommand_name check_smart\r\ncommand_line \/usr\/lib\/nagios\/plugins\/check_snmp -H $HOSTADDRESS$ -C public -o $ARG1$ -r $ARG2$\r\n}\r\n<\/pre>\n<p>and the following service:<\/p>\n<pre>\r\ndefine service{\r\nuse generic-service\r\nhost_name monserveur\r\nservice_description SMART_sda\r\ncheck_command check_smart!.1.3.6.1.4.1.2021.8.1.101.1!PASSED\r\n}\r\n<\/pre>\n<h2><span id=\"Read_More\">Read More<\/span><\/h2>\n<p><a href=\"http:\/\/blog.nicolargo.com\/2011\/10\/supervision-smart-de-vos-disques-via-nagios.html\" title=\"Nicolas Hennion blog (fr)\">Nicolas Hennion blog (fr)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contents1 SNMP1.1 List all interfaces1.2 Get interface informations1.2.1 Name1.2.2 Speed2 VMWare vSphere2.1 Installation2.2 Configuration3 Smart3.1 Installation3.2 Configuration3.3 Read More SNMP List all interfaces perl check_snmp_int.pl -H MYHOST -C public -n zzzz -v Get interface informations Name # for interface number 1 .\/check_snmp -H MYHOST -C public -o ifName.1 Speed # for interface number 1 .\/check_snmp [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":440,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-817","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/817","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=817"}],"version-history":[{"count":11,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/817\/revisions"}],"predecessor-version":[{"id":1214,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/817\/revisions\/1214"}],"up":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/440"}],"wp:attachment":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}