<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Jason Antman's Blog &#187; snmp</title> <atom:link href="http://blog.jasonantman.com/tags/snmp/feed/" rel="self" type="application/rss+xml" /><link>http://blog.jasonantman.com</link> <description>A general-purpose dump of my thoughts, tips, tricks, and observations on a wide variety of topics - Linux, Free Software, the Internet, IT, EMS, software development, systems administration, and the state of the world.</description> <lastBuildDate>Thu, 01 Jul 2010 15:17:33 +0000</lastBuildDate> <generator>http://wordpress.org/</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Nagios check scripts</title><link>http://blog.jasonantman.com/2010/03/nagios-check-scripts/</link> <comments>http://blog.jasonantman.com/2010/03/nagios-check-scripts/#comments</comments> <pubDate>Wed, 17 Mar 2010 03:33:43 +0000</pubDate> <dc:creator>Jason Antman</dc:creator> <category><![CDATA[Miscellaneous Geek Stuff]]></category> <category><![CDATA[1-wire]]></category> <category><![CDATA[asterisk]]></category> <category><![CDATA[bacula]]></category> <category><![CDATA[DOCSIS]]></category> <category><![CDATA[Nagios]]></category> <category><![CDATA[snmp]]></category> <category><![CDATA[syslog]]></category> <category><![CDATA[ubiquiti]]></category><guid isPermaLink="false">http://blog.jasonantman.com/?p=599</guid> <description><![CDATA[Some Nagios check scripts that I've wirtten, collected into one place for others to use. Includes scripts for Asterisk IAX peers, Ubiquiti WAPs, Dallas Semi 1-Wire (OWFS) temp sensors, Bacula jobs, DOCSIS cable modems and syslog file age.<div class="ezAdsense adsense adsense-leadout" style="text-align:center;margin:12px;"><script type="text/javascript">google_ad_client="pub-6049167767809021";google_ad_slot="8888378867";google_ad_width=336;google_ad_height=280;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>]]></description> <content:encoded><![CDATA[<p>Last week I added some of my Nagios check scripts to my <a href="http://svn.jasonantman.com/public-nagios/" onclick="pageTracker._trackPageview('/outgoing/svn.jasonantman.com/public-nagios/?referer=');">public-nagios SVN repository</a>. Perhaps they&#8217;ll be of some use to some other people&#8230;</p><ul><li><a href="http://svn.jasonantman.com/public-nagios/check_1wire_temps.php" onclick="pageTracker._trackPageview('/outgoing/svn.jasonantman.com/public-nagios/check_1wire_temps.php?referer=');">check_1wire_temps.php</a> &#8211; quick and dirty, built for one specific application, but a good starting place for checking Dallas 1-wire temperatures via OWFS.</li><li><a href="http://svn.jasonantman.com/public-nagios/check_802dot11.php" onclick="pageTracker._trackPageview('/outgoing/svn.jasonantman.com/public-nagios/check_802dot11.php?referer=');">check_802dot11.php</a> &#8211; A script to check various things in the IEEE-802DOT11 MIB, written for Ubiquiti APs (SNMP).</li><li><a href="http://svn.jasonantman.com/public-nagios/check_frogfoot.php" onclick="pageTracker._trackPageview('/outgoing/svn.jasonantman.com/public-nagios/check_frogfoot.php?referer=');">check_frogfoot.php</a> &#8211; A script to check some stuff from FROGFOOT-MIB, also written for Ubiquiti APs (SNMP).</li><li><a href="http://svn.jasonantman.com/public-nagios/check_asterisk_iaxpeers" onclick="pageTracker._trackPageview('/outgoing/svn.jasonantman.com/public-nagios/check_asterisk_iaxpeers?referer=');">check_asterisk_iaxpeers</a> &#8211; a Python check script to parse the output of rasterisk for IAX peer status and latency (includes perf data output).</li><li><a href="http://svn.jasonantman.com/public-nagios/check_bacula_job.php" onclick="pageTracker._trackPageview('/outgoing/svn.jasonantman.com/public-nagios/check_bacula_job.php?referer=');">check_bacula_job.php</a> &#8211; A script to connect to the Bacula database and make sure a specified job terminated OK and was run on schedule.</li><li><a href="http://svn.jasonantman.com/public-nagios/check_docsis" onclick="pageTracker._trackPageview('/outgoing/svn.jasonantman.com/public-nagios/check_docsis?referer=');">check_docsis</a> &#8211; A script to check status and various metrics for cable modems implementing the DOCSIS MIB (SNMP). Works with (at least) the Motorola SurfBoard modems used by Cablevision (which use 192.168.100.1 on the LAN side).</li><li><a href="http://svn.jasonantman.com/public-nagios/check_syslog_age.php" onclick="pageTracker._trackPageview('/outgoing/svn.jasonantman.com/public-nagios/check_syslog_age.php?referer=');">check_syslog_age.php</a> &#8211; A PHP script which checks (recursively) that the newest file under a directory is no more than X seconds old. I use this for checking my centralized syslog server, which has logs separated out in <code>/var/log/HOSTS/hostname</code>.</li></ul><div class="ezAdsense adsense adsense-leadout" style="text-align:center;margin:12px;"><script type="text/javascript">google_ad_client="pub-6049167767809021";google_ad_slot="8888378867";google_ad_width=336;google_ad_height=280;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>]]></content:encoded> <wfw:commentRss>http://blog.jasonantman.com/2010/03/nagios-check-scripts/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Daily Work &#8211; Nagios SNMP traps, Vyatta, JasonAntman.com upgrades</title><link>http://blog.jasonantman.com/2009/06/daily-work-nagios-snmp-traps-vyatta-jasonantmancom-upgrades/</link> <comments>http://blog.jasonantman.com/2009/06/daily-work-nagios-snmp-traps-vyatta-jasonantmancom-upgrades/#comments</comments> <pubDate>Sat, 27 Jun 2009 06:03:09 +0000</pubDate> <dc:creator>Jason Antman</dc:creator> <category><![CDATA[Miscellaneous Geek Stuff]]></category> <category><![CDATA[apc]]></category> <category><![CDATA[bluesocket]]></category> <category><![CDATA[Nagios]]></category> <category><![CDATA[snmp]]></category> <category><![CDATA[vyatta]]></category><guid isPermaLink="false">http://blog.jasonantman.com/?p=428</guid> <description><![CDATA[Summary of my daily projects - a Vyatta router rollout, getting Nagios to handle SNMP traps from an APC UPS, and a hardware upgrade.]]></description> <content:encoded><![CDATA[<p>So it&#8217;s been a very busy day. I was up until 5 AM or so working on implementing <a href="http://reductivelabs.com/trac/puppet/" onclick="pageTracker._trackPageview('/outgoing/reductivelabs.com/trac/puppet/?referer=');">Puppet</a> at home. I&#8217;m building two new boxes &#8211; a storage (centralized home directory)/syslog (to MySQL) server and a second web server (possibly also to handle Nagios) &#8211; and I decided that they&#8217;ll be totally built by Puppet. The only thing I had to give up on was setting up the NFS share for my home directory on the new storage box and installing and testing <a href="http://www.rsyslog.com/" onclick="pageTracker._trackPageview('/outgoing/www.rsyslog.com/?referer=');">rsyslog</a> on it.</p><p>This afternoon around 7, I started on my weekend projects for <a href="http://www.midlandparkambulance.com" onclick="pageTracker._trackPageview('/outgoing/www.midlandparkambulance.com?referer=');">the ambulance corps</a> &#8211; setting up <a href="http://www.nagios.org" onclick="pageTracker._trackPageview('/outgoing/www.nagios.org?referer=');">Nagios</a> to receive SNMP traps from the APC UPS and moving over to the new <a href="http://www.vyatta.org" onclick="pageTracker._trackPageview('/outgoing/www.vyatta.org?referer=');">Vyatta</a>-based router (from <a href="http://m0n0.ch/wall/" onclick="pageTracker._trackPageview('/outgoing/m0n0.ch/wall/?referer=');">m0n0wall</a>). I&#8217;d attempted the router before, but had to rollback &#8211; I&#8217;m using an old <a href="http://www.bluesocket.com/" onclick="pageTracker._trackPageview('/outgoing/www.bluesocket.com/?referer=');">BlueSocket</a> controller for hardware &#8211; it&#8217;s just a nice black 1U enclosure with a stock Intel motherboard, 20GB HDD, 512MB RAM and three 10/100 NICs. The first time, I was unable to get link on either of the two NICs I was using, so I decided to rollback.</p><p><strong>Nagios SNMP Traps</strong></p><p>I found a good starting point for Nagios SNMP traps on the <a href="http://altinity.blogs.com/dotorg/2006/03/lessons_in_snmp.html" onclick="pageTracker._trackPageview('/outgoing/altinity.blogs.com/dotorg/2006/03/lessons_in_snmp.html?referer=');">OpsView blog</a>. I setup `snmptrapd` on the Nagios server and hacked together a little Python script to just write all of the traps to a file. After some testing with `snmptrap` on my laptop, I did a test by pulling the power plug of the UPS, waiting about 30 seconds, and then plugging it back in. Sure enough, the little old <a href="http://blog.jasonantman.com/2007/03/apc-ap9605-powernet-snmp-card/">AP9605 PowerNet SNMP card</a> generated two SNMP traps &#8211; one for power loss and one for power regained &#8211; both of which showed up in the test file</p><p>The next step will be deciding how to get the traps into Nagios &#8211; specifically whether I want to go with something heavy-weight, like <a href="http://snmptt.sourceforge.net/" onclick="pageTracker._trackPageview('/outgoing/snmptt.sourceforge.net/?referer=');">SNMPtt</a> that can handle other devices, or whether I want to code a simple script myself just to deal with the APC cards.</p><p><strong>Router</strong></p><p>The main reason why I wanted to make the switch from m0n0 to Vyatta was to ease the setup and maintenance of an IPsec tunnel from the ambulance HQ to my house, so I could push backups (relatively small) over the WAN to my infrastructure (or, rather, have Bacula pull the backups). Another big bonus was finally having a way of configuring and checking things through SSH without having to port-forward a web GUI. Another bonus of having a real Linux system under the router is the ability to make custom Nagios check scripts and easily execute them. Something I hadn&#8217;t thought of &#8211; but became obvious during the switchover &#8211; is the ability to run full-fledged `tcpdump` on the router itself.</p><p>After building the new config myself, and confirming that the system ran in isolation, I moved it over to production. The first issue was a bit of a thinko on my part &#8211; the interfaces on the BSC are actually arranged on the back of the box like eth0&#8212;&#8211;eth2&#8212;&#8211;eth1, so I originally had the LAN uplink in the wrong interface. After correcting that and waiting for the network to stabilize, I noticed a total external connectivity failure. After some troubleshooting &#8211; thanks to tcpdump on the router &#8211; it occurred to me that the (ancient) cable modem needs to be rebooted when the router MAC changes.</p><p>I honestly don&#8217;t remember the other problems that I ran into, but eventually I ended up getting almost-full functionality &#8211; and then a total network outage. A tcpdump on my laptop showed some really really weird BOOTP traffic with addresses of 255.255.255.255. After doing some troubleshooting and monitoring port counters on the switch, I narrowed it down to coming from a single Windows box and the wireless access point. After shutting off both ports, things seemed to stabilize. I also had some &#8220;martian address&#8221; issues with one of the boxes, but decided to roll the box and that solved it.</p><p>Over the next day or so, I&#8217;ll be reconfiguring Nagios both at home and at the ambulance corps to cope with the changes and add in the requisite monitoring, and keep an eye on things. Assuming all goes well, I&#8217;ll power down the old router on Sunday.</p><p>On the home front, I&#8217;ve moved over from my old storage machine to the old one &#8211; essentially just the NFS mount, and moved over a tarball of everything else. I also added a 1000Base-SX card to the new box, though it appears that I&#8217;m out of fiber patch cords. The old storage box was brought down for the first time in about 3 years (aside from brief outages for hardware upgrades or array rebuilds). Assuming I got everything off of it, it will be relegated to the spares pile.</p><p>I&#8217;m going to make a serious effort to post on a daily basis, if only for my own future reference. I should have the demo of <a href="http://rackman.jasonantman.com" onclick="pageTracker._trackPageview('/outgoing/rackman.jasonantman.com?referer=');">RackMan</a> out soon, and I&#8217;m also about to start on integrating it with Nathan Hubbard&#8217;s <a href="http://www.machdb.org/" onclick="pageTracker._trackPageview('/outgoing/www.machdb.org/?referer=');">MachDB</a> as well as a PHP script I wrote to pull port names and MACs from Cisco switches and associate them with NICs in machines. Hopefully I&#8217;ll also have some interesting Puppet stuff out soon.</p> ]]></content:encoded> <wfw:commentRss>http://blog.jasonantman.com/2009/06/daily-work-nagios-snmp-traps-vyatta-jasonantmancom-upgrades/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>APC AP9605 PowerNet SNMP Card</title><link>http://blog.jasonantman.com/2007/03/apc-ap9605-powernet-snmp-card/</link> <comments>http://blog.jasonantman.com/2007/03/apc-ap9605-powernet-snmp-card/#comments</comments> <pubDate>Thu, 01 Mar 2007 22:09:00 +0000</pubDate> <dc:creator>Jason Antman</dc:creator> <category><![CDATA[Tech HowTos]]></category> <category><![CDATA[ap9605]]></category> <category><![CDATA[apc]]></category> <category><![CDATA[powernet]]></category> <category><![CDATA[snmp]]></category> <category><![CDATA[UPS]]></category><guid isPermaLink="false">http://jantman.dyndns.org:10011/wp/?p=11</guid> <description><![CDATA[A short article describing how to setup and use the APC AP9605 PowerNet SNMP monitoring card for APC UPS's - an inexpensive card that allows detailed network-based monitoring of APC SmartUPS units.]]></description> <content:encoded><![CDATA[<p>In the theme of upgrades, I also purchased two APC SmartUPS1000 units from refurbUPS.com. Now, I know that a lot of people are perfectly happy with serial connectivity. And it has its positives. But I&#8217;m running 2-3 servers per UPS, older servers, wanted to be able to monitor the UPSs, and perhaps control server shutdown, over the network.. So, I found that refurbUPS.com also sells SNMP management cards for them. They sell a refurbished AP9605 &#8211; it&#8217;s an old 10BaseT PowerNet SNMP-only card (with telnet management). Seemed good, and the price of $15 was right.</p><p>They showed up, but I couldn&#8217;t find much about them online, let alone anything useful.</p><p>After a phone call to APC, I managed to get the user&#8217;s manual emailed to me. The few instructions I found online were totally wrong.</p><p>The general setup goes like this:</p><ol><li>Connect network cable to card.</li><li>Connect serial cable between a computer and the UPS&#8217;s serial port.</li><li>Get a terminal emulator, like <a href="http://alioth.debian.org/projects/minicom" onclick="pageTracker._trackPageview('/outgoing/alioth.debian.org/projects/minicom?referer=');">minicom</a>. Speed is 2400bps.</li><li>connect and press enter. You&#8217;ll be asked for a username and password. Use &#8220;apc&#8221; for both.</li><li>5) Setup the network &#8211; IP, mask, gateway, etc.</li><li>Ready-to-go!</li></ol><p>I also have some information about the card on my wiki at: <a href="http://wiki.jasonantman.com/index.php/AP9605" onclick="pageTracker._trackPageview('/outgoing/wiki.jasonantman.com/index.php/AP9605?referer=');">AP9605</a>.</p> ]]></content:encoded> <wfw:commentRss>http://blog.jasonantman.com/2007/03/apc-ap9605-powernet-snmp-card/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 5/14 queries in 0.016 seconds using disk

Served from: mpac.midlandparkambulance.com @ 2010-07-30 10:02:51 -->