{"id":6716,"date":"2013-05-20T09:43:21","date_gmt":"2013-05-20T07:43:21","guid":{"rendered":"http:\/\/nolabnoparty.com\/?p=6716"},"modified":"2014-05-04T13:14:45","modified_gmt":"2014-05-04T11:14:45","slug":"monitoring-buffalo-terastation-nas-with-nagios","status":"publish","type":"post","link":"https:\/\/nolabnoparty.com\/en\/monitoring-buffalo-terastation-nas-with-nagios\/","title":{"rendered":"Monitoring Buffalo TeraStation NAS with Nagios"},"content":{"rendered":"<p><img decoding=\"async\" style=\"background-image: none; margin: 10px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;\" title=\"terastation01\" alt=\"terastation01\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2013\/05\/terastation01.jpg\" width=\"602\" height=\"202\" border=\"0\" \/><\/p>\n<p>Monitoring the <strong>storage usage<\/strong> in NAS devices is a key point to maintain the network functionality. What if the NAS where the backup saves its files run out of space? The backup fails and risk of data loss can be unpredictable.<\/p>\n<p>To monitor <strong>Buffalo <strong>TeraStation family\u00a0<\/strong>NAS devices<\/strong>, Nagios can help with the use of a dedicate plugin PHP based named <span style=\"text-transform: none; background-color: #ffffff; text-indent: 0px; letter-spacing: normal; display: inline !important; font: 11px\/18px verdana, tahoma, sans-serif; white-space: normal; float: none; color: #000000; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;\"><a href=\"http:\/\/exchange.nagios.org\/directory\/Plugins\/Hardware\/Storage-Systems\/SAN-and-NAS\/Check-TeraStation-Storage\/details\" target=\"_blank\" rel=\"noopener\">check_terastation_storage.php<\/a>.<\/span><\/p>\n<p><!--more--><\/p>\n<p>&nbsp;<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>A working <strong>Nagios<\/strong> system<\/li>\n<li><a href=\"http:\/\/exchange.nagios.org\/directory\/Plugins\/Hardware\/Storage-Systems\/SAN-and-NAS\/Check-TeraStation-Storage\/details\" target=\"_blank\" rel=\"noopener\">check_terastation_storage.php<\/a> plugin<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>Nagios configuration<\/h2>\n<p>Download the plugin and <strong>copy it in the directory<\/strong> <em>\/var\/lib64\/nagios\/plugins<\/em>.<\/p>\n<p><span style=\"color: #0000a0;\"># cp check_terastation_storage.php \/usr\/lib64\/nagios\/plugins<\/span><\/p>\n<p>Edit the Nagios configuration file <strong>checkcommands.cfg<\/strong> and insert the following lines:<\/p>\n<pre class=\"brush: shell; gutter: true\">define command {\r\ncommand_name check_terastation_storage\r\ncommand_line php \/path\/to\/check_terastation_storage.php $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$\r\n}<\/pre>\n<p><span style=\"color: #0000a0;\"># vi \/etc\/nagios\/checkcommands.cfg<\/span><\/p>\n<p><img decoding=\"async\" style=\"background-image: none; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;\" title=\"terastation02\" alt=\"terastation02\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2013\/05\/terastation02.jpg\" width=\"600\" height=\"90\" border=\"0\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4 style=\"font-size: 13px;\">Usage<\/h4>\n<p>The plugin has to be used with the <strong>following syntax<\/strong>:<\/p>\n<blockquote><p>php check_terastation_storage.php IP_HOST COMMUNITY WARNING CRITICAL<\/p><\/blockquote>\n<p>Example: php check_terastation_storage.php 192.168.10.20 public 10 5<\/p>\n<p>&nbsp;<\/p>\n<h2>Testing the plugin<\/h2>\n<p>Prior testing the plugin from Nagios, you need to <strong>enable SNMP<\/strong> from the NAS device.<\/p>\n<p>From TeraStation <strong>web console<\/strong>, select menu <strong>Network &gt; SNMP<\/strong> enable click on <strong>Modify Settings<\/strong> button and enable <strong>SNMP Settings<\/strong> and set the <strong>SNMP community name<\/strong> as <span style=\"color: #ff0000;\"><strong>public<\/strong><\/span> then click <strong>Save<\/strong>.<\/p>\n<p><img decoding=\"async\" style=\"background-image: none; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;\" title=\"terastation03\" alt=\"terastation03\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2013\/05\/terastation03.jpg\" width=\"600\" height=\"175\" border=\"0\" \/><\/p>\n<p>From <strong>Nagios console<\/strong> go to <em>\u2026\/nagios\/plugins<\/em> directory and type the command.<\/p>\n<p><span style=\"color: #0000a0;\"># cd \/usr\/lib64\/nagios\/plugins<br \/>\n# php check_terastation_storage.php 192.168.10.20 public 10 5<\/span><\/p>\n<p><img decoding=\"async\" style=\"background-image: none; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;\" title=\"terastation03\" alt=\"terastation03\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2013\/05\/terastation031.jpg\" width=\"600\" height=\"80\" border=\"0\" \/><\/p>\n<p>Opening the browser, Nagios <strong>displays information<\/strong> related to Storage Usage of TeraStation NAS devices.<\/p>\n<p><img decoding=\"async\" style=\"background-image: none; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;\" title=\"terastation05\" alt=\"terastation05\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2013\/05\/terastation05.jpg\" width=\"600\" height=\"48\" border=\"0\" \/><\/p>\n<p>The monitoring system can now check the storage usage in order to <strong>notify the administrator<\/strong> for any concern.<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/images\/firma.jpg\" title=\"\"><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Monitoring the storage usage in NAS devices is a key point to maintain the network functionality. What if the NAS where the backup saves its files run out of space? The backup fails and risk of data loss can be unpredictable. To monitor Buffalo TeraStation family\u00a0NAS devices, Nagios can help with the use of a dedicate plugin PHP based named check_terastation_storage.php.<\/p>\n","protected":false},"author":3,"featured_media":6711,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rop_custom_images_group":[],"rop_custom_messages_group":[],"rop_publish_now":"initial","rop_publish_now_accounts":{"linkedin_93tdZWzMZc_93tdZWzMZc":"","facebook_2879994398731222_17841400390232720":"","twitter_113568041_113568041":"","mastodon_115463926174894442_115463926174894442":""},"rop_publish_now_history":[],"rop_publish_now_status":"pending","footnotes":""},"categories":[898,901,902],"tags":[623,634,624,657,621],"class_list":["post-6716","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-monitoring-en","category-nagios-en","category-plugins-en","tag-check_terastation_storage-php","tag-monitoring-en","tag-nagios-en","tag-snmp-en","tag-terastation","has_thumb"],"_links":{"self":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/posts\/6716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/comments?post=6716"}],"version-history":[{"count":0,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/posts\/6716\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/media\/6711"}],"wp:attachment":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/media?parent=6716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/categories?post=6716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/tags?post=6716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}