{"id":6,"date":"2008-01-11T12:27:05","date_gmt":"2008-01-11T10:27:05","guid":{"rendered":"http:\/\/www.caw.co.za\/?p=6"},"modified":"2008-01-11T14:11:35","modified_gmt":"2008-01-11T12:11:35","slug":"configure-ups-monitoring-on-sme-server-using-a-powercom-ups","status":"publish","type":"post","link":"https:\/\/www.caw.co.za\/?p=6","title":{"rendered":"Configure UPS Monitoring on SME Server Using A Powercom UPS"},"content":{"rendered":"<p>This document is based on <a href=http:\/\/www.sonoracomm.com\/index.php?option=com_content&#038;task=view&#038;id=201&#038;Itemid=32>&#8216;Configure UPS Monitoring on SME Server&#8217;<\/a>; from Sonora Communications, Inc.<\/p>\n<p><strong>Configure UPS Monitoring on SME Server<\/strong><\/p>\n<p>This document is very limited in scope as it pertains only to SME Server 7 being used with the included NUT 2.0.5 UPS monitoring software in conjunction with a PowerCom BTN-2000 UPS.<\/p>\n<p>NUT UPS Monitoring Software <u><strong><a href=\"http:\/\/www.networkupstools.org\/\" target=\"_blank\">Network UPS Tools<\/a><\/strong><\/u> is probably the best open-source UPS monitoring tool available for Linux.  The software does not run on Windows, but the <u><strong><a href=\"http:\/\/www.csociety.org\/%7Edelpha\/winnut\/\" target=\"_blank\">WinNUT<\/a><\/strong><\/u> tool allows you to control a Windows box that might be connected to the same UPS.<\/p>\n<p><strong>Configure SME Server and NUT<\/strong><br \/>\nConnect the serial cable that came with the UPS from the SME server to the UPS.  This is a 9-pin female to a 9-pin male.  Do not use any other cable.<\/p>\n<p>At the SME console as root:<\/p>\n<p>Update the NUT package to the latest:<\/p>\n<blockquote><p> \t<span style=\"font-family: courier new,courier\">yum update e-smith-nutUPS<\/span><\/p><\/blockquote>\n<p>Configure UPS monitoring:<\/p>\n<blockquote><p> \t<span style=\"font-family: courier new,courier\">config setprop nut Model genericups<br \/>\nconfig setprop nut Device \/dev\/ttyS0<br \/>\nconfig setprop nut Type KIN1500AP<br \/>\n<\/span><span style=\"font-family: courier new,courier\">config setprop nut mfr PowerCom<br \/>\n<\/span><span style=\"font-family: courier new,courier\">config setprop nut mdl KIN1500AP<\/span><br \/>\n<span style=\"font-family: courier new,courier\"> \tconfig setprop nut status enabled<\/span><\/p><\/blockquote>\n<p>You can then view the settings like this:<\/p>\n<blockquote><p> \t<span style=\"font-family: courier new,courier\">config show nut<\/span><\/p><\/blockquote>\n<p>Create a custom template to specify the ups type:<\/p>\n<blockquote><p><span style=\"font-family: courier new,courier\">touch -p \/etc\/e-smith\/templates-custom\/etc\/ups\/ups.conf\/UPS<\/span><\/p>\n<p><span style=\"font-family: courier new,courier\">vi \/etc\/e-smith\/templates-custom\/etc\/ups\/ups.conf\/UPS<\/span><\/p>\n<p>Paste the following section into the template:<br \/>\n<span style=\"font-family: courier new,courier\"><br \/>\n{<br \/>\nmy $model = $nut{Model} || &#8220;newhidups&#8221;;<br \/>\nmy $device = $nut{Device} || &#8220;\/var\/lib\/ups\/hiddev0&#8221;;<br \/>\nmy $type = $nut{Type};<br \/>\nmy $mfr = $nut{mfr};<br \/>\nmy $mdl = $nut{mdl};<br \/>\n$OUT .= &#8220;[UPS]\\n&#8221;;<br \/>\n$OUT .= &#8220;\\tdriver = $model\\n&#8221;;<br \/>\n$OUT .= &#8220;\\ttype = $type\\n&#8221;;<br \/>\nif  ($model eq &#8216;genericups&#8217;)<br \/>\n{<br \/>\n$OUT .= &#8220;\\tupstype = $type\\n&#8221; if defined $type;<br \/>\n$OUT .= &#8220;\\tmfr = $mfr\\n&#8221; if defined $mfr;<br \/>\n$OUT .= &#8220;\\tmodel = $mdl\\n&#8221; if defined $mdl;<br \/>\n}<br \/>\n$OUT .= &#8220;\\tport = $device\\n&#8221;;<br \/>\n}<br \/>\n<\/span><br \/>\nSave the fragment.<\/p><\/blockquote>\n<p>Apply the new settings like this (server will reboot):<\/p>\n<blockquote><p> \t<span style=\"font-family: courier new,courier\">signal-event post-upgrade; signal-event reboot<\/span><\/p><\/blockquote>\n<p>If you don&#8217;t want to reboot the server, you can do this instead:<\/p>\n<blockquote><p> \t<span style=\"font-family: courier new,courier\">expand-template \/etc\/sysconfig\/ups<br \/>\nexpand-template \/etc\/ups\/*<br \/>\n\/etc\/rc7.d\/S15nut start<\/span><\/p><\/blockquote>\n<p>You can confirm the communication with this command:<\/p>\n<blockquote><p> \t<span style=\"font-family: courier new,courier\">upsc UPS@localhost<\/span><\/p><\/blockquote>\n<p>You can view log entries with one or more of these commands:<\/p>\n<blockquote><p> \t<span style=\"font-family: courier new,courier\">grep nut \/var\/log\/messages<br \/>\n<\/span><\/p><\/blockquote>\n<blockquote><p> \t<span style=\"font-family: courier new,courier\">grep ups \/var\/log\/messages<\/span><\/p><\/blockquote>\n<blockquote><p> \t<span style=\"font-family: courier new,courier\">egrep &#8216;nut|ups&#8217; \/var\/log\/messages<\/span><\/p><\/blockquote>\n<h3>Configure a Windows Slave<\/h3>\n<p>We run multiple Windows servers running MS Exchange, MS SQL Server, Terminal Services and WSUS. We run WinNUT on the Windows servers to shutdown the servers in case of prolonged power failure.<\/p>\n<p>Download and install <u><strong><a href=\"http:\/\/csociety.ecn.purdue.edu\/%7Edelpha\/winnut\/\" target=\"_blank\">WinNUT<\/a><\/strong><\/u> on the Windows server as an administrator.<\/p>\n<p>Use these commands at the SME server console to gather the needed configuration information:<\/p>\n<blockquote><p> \t<span style=\"font-family: courier new,courier\"> \tcat \/etc\/ups\/upsd.conf<\/span><span style=\"font-family: courier new,courier\"><br \/>\n<\/span><span style=\"font-family: courier new,courier\"> \tcat \/etc\/ups\/upsd.users<\/span><br \/>\n<span style=\"font-family: courier new,courier\"> \tcat \/etc\/ups\/ups.conf<\/span><\/p><\/blockquote>\n<p>On the Windows machine, click the Edit button to edit the upsmon.conf file.  Enter a line similar to this a the top.  You can just un-comment a MONITOR line and edit it:<\/p>\n<blockquote><p> \t<span style=\"font-family: courier new,courier\">MONITOR UPS@&lt;sme servername or IP&gt; 1 upsslave &lt;password of upsslave&gt; slave<\/span><\/p><\/blockquote>\n<p>Example:<\/p>\n<blockquote><p> \t<span style=\"font-family: courier new,courier\">MONITOR UPS@myserver 1 upsslave 123456789123456 slave<\/span><\/p><\/blockquote>\n<p>Save the changes and continue configuring WinNUT:<\/p>\n<ul>\n<li>Install as a Service<\/li>\n<li>Automatic Startup<\/li>\n<li>Apply and Start WinNUT<\/li>\n<\/ul>\n<p>You can then click the View button to check the results.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This document is based on &#8216;Configure UPS Monitoring on SME Server&#8217;; from Sonora Communications, Inc. Configure UPS Monitoring on SME Server This document is very limited in scope as it pertains only to SME Server 7 being used with the included NUT 2.0.5 UPS monitoring software in conjunction with a PowerCom BTN-2000 UPS. NUT UPS&hellip;&nbsp;<a href=\"https:\/\/www.caw.co.za\/?p=6\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Configure UPS Monitoring on SME Server Using A Powercom UPS<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-6","post","type-post","status-publish","format-standard","hentry","category-sme"],"_links":{"self":[{"href":"https:\/\/www.caw.co.za\/index.php?rest_route=\/wp\/v2\/posts\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.caw.co.za\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.caw.co.za\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.caw.co.za\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.caw.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6"}],"version-history":[{"count":0,"href":"https:\/\/www.caw.co.za\/index.php?rest_route=\/wp\/v2\/posts\/6\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.caw.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.caw.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.caw.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}