<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>LINICKX.com</title><link>https://www.linickx.com/</link><description></description><lastBuildDate>Wed, 30 Mar 2005 09:41:00 +0100</lastBuildDate><item><title>Cacti. How to Enable SNMP v3 Polling.</title><link>https://www.linickx.com/cacti-how-to-enable-snmp-v3-polling</link><description>&lt;h2&gt;Cacti SNMP v3 How-To (0.2)&lt;/h2&gt;
&lt;h3&gt;Preface:&lt;/h3&gt;
&lt;p&gt;This document is intended to describe the process required to enable
encrypted snmp polling within cacti. The document was written whilst
performing the installation on a Linux Fedora Core 3 server, although
implemntations on Fedora Core 1 &amp;amp; White Box Enterprise Linux have also
been sucesful. The host used to gather data from for the purpose of this
document is a Nokia IPSO appliance.&lt;/p&gt;
&lt;h3&gt;Limitations:&lt;/h3&gt;
&lt;p&gt;The version of cacti used will be 0.8.6b, "TheWitness" has told me that
this version has a pooler crash, but I've yet to try upgrading to
8.8.6c.&lt;/p&gt;
&lt;h3&gt;System Requirements:&lt;/h3&gt;
&lt;p&gt;Apache, php, mysql, snmp, rrd-tool, and cacti ;-)&lt;/p&gt;
&lt;h3&gt;Installation:&lt;/h3&gt;
&lt;div class="comment"&gt;

I'm going to assume that you've got to the point where all of the parts
needed for system requirements are working, cacti is installed, and
you've just logged in after step 8 of
&lt;http://www.cacti.net/downloads/docs/html/install_unix.html&gt; and was
going to create a device.

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Log out ;-)
    &lt;div class="comment"&gt;&lt;/p&gt;
&lt;p&gt;Before we can create any snmp v3, we need to enable it; to enable
snmp we need to make some changes to the php files.&lt;/p&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change: \~/cacti_install_dir/lib/snmp.php.txt
    &lt;div class="comment"&gt;&lt;/p&gt;
&lt;p&gt;Line 46:
&lt;/p&gt;
&lt;div class="code"&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Change: \$version = "1";&lt;/li&gt;
&lt;li&gt;to: \$version = "3";&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;Line 65:&lt;/p&gt;
&lt;div class="code"&gt;
&lt;ul&gt;
&lt;li&gt;Change: \$snmp_auth = "-u \$username -X \$password"; /* v3 -
    username/password */&lt;/li&gt;
&lt;li&gt;to: \$snmp_auth = "-u \$username -A \$password"; /* v3 -
    username/password */&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;Line 119:&lt;/p&gt;
&lt;div class="code"&gt;
&lt;ul&gt;
&lt;li&gt;Change: \$snmp_auth = "-u \$username -X \$password"; /* v3 -
    username/password */&lt;/li&gt;
&lt;li&gt;to: \$snmp_auth = "-u \$username -A \$password"; /* v3 -
    username/password */&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change: \~/cacti_install_dir/include/config_form.php.txt
    &lt;div class="comment"&gt;&lt;/p&gt;
&lt;p&gt;Line 655:
&lt;/p&gt;
&lt;div class="code"&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Change: "method" =&amp;gt; "hidden"&lt;/li&gt;
&lt;li&gt;to: "method" =&amp;gt; "textbox"&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;Line 663:&lt;/p&gt;
&lt;div class="code"&gt;
&lt;ul&gt;
&lt;li&gt;Change: "method" =&amp;gt; "hidden"&lt;/li&gt;
&lt;li&gt;to: "method" =&amp;gt; "textbox"&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change: config_settings.php.txt
    &lt;div class="comment"&gt;&lt;/p&gt;
&lt;p&gt;Uncomment Line 186 -&amp;gt; 199, i.e. remove the "//" from the begining
of each line.&lt;/p&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change: config_array.php.txt
    &lt;div class="comment"&gt;&lt;/p&gt;
&lt;p&gt;Line 135:
&lt;/p&gt;
&lt;div class="code"&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Change:&lt;br /&gt;
    \$snmp_versions = array(1 =&amp;gt;&lt;br /&gt;
    "Version 1" ,&lt;br /&gt;
    "Version 2" );&lt;/li&gt;
&lt;li&gt;To:&lt;br /&gt;
    \$snmp_versions = array(1 =&amp;gt;&lt;br /&gt;
    "Version 1",&lt;br /&gt;
    "Version 2",&lt;br /&gt;
    "Version 3");&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create /etc/snmp/snmp.conf
    &lt;div class="comment"&gt;&lt;/p&gt;
&lt;p&gt;The contents of the file should be:
&lt;/p&gt;
defContext ""&lt;br /&gt;
defSecurityLevel authNoPriv&lt;/p&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create Device
    &lt;div class="comment"&gt;&lt;/p&gt;
&lt;p&gt;As documented.
&lt;a href="http://www.cacti.net/downloads/docs/html/graph_howto.html#NEW_DEVICE"&gt;http://www.cacti.net/downloads/docs/html/graph_howto.html#NEW_DEVICE&lt;/a&gt;&lt;br /&gt;
(For Nokia IPSO Appliences use host Templaye Generic SNMP-enabled&lt;br /&gt;
HOST, and Associated Data Queries: SNMP - Get Processor Infomation
&amp;amp; SNMP -&lt;br /&gt;
Interface Statistics )
&lt;/p&gt;
&lt;a href="http://linickx.com/files/pics/cacti-snmpv3-createhost.png"&gt;&lt;img alt="Screen Shot of creating a cacti
device" src="http://linickx.com/files/pics/.thumb.cacti-snmpv3-createhost.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create Graph
    &lt;div class="comment"&gt;&lt;/p&gt;
&lt;p&gt;As Documented.
&lt;a href="http://www.cacti.net/downloads/docs/html/graph_howto.html"&gt;http://www.cacti.net/downloads/docs/html/graph_howto.html&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Appendix:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Rpms on my FC3 Machine
    &lt;div class="shell"&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$SHELL&amp;gt;rpm -qa | grep mysql
mysql-3.23.58-14
php-mysql-4.3.10-3.2
mysql-server-3.23.58-14
mysql-devel-3.23.58-14
libdbi-dbd-mysql-0.6.5-9

$SHELL&amp;gt; rpm -qa | grep php
php-ldap-4.3.10-3.2
php-mysql-4.3.10-3.2
php-odbc-4.3.10-3.2
php-4.3.10-3.2
php-pear-4.3.10-3.2

$SHELL&amp;gt; rpm -qa | grep http
httpd-suexec-2.0.52-3.1
system-config-httpd-1.3.1-1
httpd-2.0.52-3.1
httpd-manual-2.0.52-3.1

$SHELL&amp;gt; rpm -qa | grep rrd
rrdtool-1.0.49-3

$SHELL&amp;gt; rpm -qa | grep snmp
net-snmp-libs-5.1.2-11
net-snmp-5.1.2-11
net-snmp-utils-5.1.2-11
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;How to setup snmp v3 on IPSO&lt;/p&gt;
&lt;div class="comment"&gt;
&lt;p&gt;(The is a quick guide of the steps needed)
&lt;/p&gt;
1.  Log into Voyager
2.  Click Config
3.  Below the heading "Security and Access Configuration" Click
    Users
4.  Add a new user (Username , uid {eg. 110}, home {eg /var/uid}),
    Click Apply
5.  Set new users password , click apply
6.  CLick Home, config, snmp
7.  at the bottom of page set user to read-write&lt;/p&gt;
&lt;p&gt;to test from cacti server, try from shell, snmpwalk -u user -A
password &lt;host&gt;,&lt;br /&gt;
you should get....&lt;/p&gt;
&lt;div class="shell"&gt;
&lt;p&gt;&lt;span class="shell-prompt"&gt;\$SHELL&amp;gt;&lt;/span&gt;snmpwalk -u user -A
password default_gw&lt;br /&gt;
SNMPv2-MIB::sysDescr.0 = STRING: IP650 rev AAA06449-411, IPSO xxx
3.7.1-BUILD004 releng 1227 11.06.2003-010000 i386&lt;br /&gt;
SNMPv2-MIB::sysObjectID.0 = OID:
SNMPv2-SMI::enterprises.94.1.21.2.1.8&lt;br /&gt;
SNMPv2-MIB::sysUpTime.0 = Timeticks: (382157315) 44 days,
5:32:53.15&lt;br /&gt;
SNMPv2-MIB::sysContact.0 = STRING: Me&lt;br /&gt;
SNMPv2-MIB::sysName.0 = STRING: Nokia&lt;br /&gt;
SNMPv2-MIB::sysLocation.0 = STRING: Here&lt;br /&gt;
SNMPv2-MIB::sysServices.0 = INTEGER: 76&lt;br /&gt;
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (16) 0:00:00.16&lt;br /&gt;
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB  &lt;/p&gt;
&lt;p&gt;SNMPv2-MIB::sysORID.2 = OID:
SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance&lt;br /&gt;
SNMPv2-MIB::sysORID.3 = OID: SNMP-MPD-MIB::snmpMPDCompliance&lt;br /&gt;
SNMPv2-MIB::sysORID.4 = OID:
SNMP-USER-BASED-SM-MIB::usmMIBCompliance&lt;br /&gt;
.......&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;p&gt;
&lt;/host&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;h3&gt;ChangeLog&lt;/h3&gt;
&lt;div class="comment"&gt;
&lt;ol&gt;
&lt;li&gt;16/3/2005 : [NICK] Doc Complete&lt;/li&gt;
&lt;li&gt;17/3/2005 : [NICK] Doc Published on &lt;a href="http://forums.cacti.net/"&gt;http://forums.cacti.net/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;30/3/2005: [NICK] Doc moved into Wordpress to allow viewers to
    comment directly&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;h3&gt;END&lt;/h3&gt;
&lt;div class="bluebox"&gt;
&lt;p&gt;And I think that's all folks, I hope it works for you &amp;amp; that you
find this of some use !.&lt;/p&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Wed, 30 Mar 2005 09:41:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2005-03-30:cacti-how-to-enable-snmp-v3-polling</guid><category>cacti</category><category>how to</category><category>Linux</category><category>snmp</category></item></channel></rss>