Articles > Linux
Required Downloads:
CactiEZ CD -- Choose from right side of screen.
-- CactiEZ Login Info
SNMPTT for Linux
SNMPTT viewer Plugin for Cacti
CaMM (Cacti Message Management plugin) Replacement for SNMPTT Plugin.
Tutorial
1. Install CactiEZ
Extract the CactiEZ package and burn the ISO to a CD. Insert CD into computer / server and boot from it. Press enter to Start Install. Press enter again to reboot. CactiEZ is now Install! Your new CactiEZ server will grab a DHCP address by default. (Pretty easy huh?)
2. Configure the Sever
Configure the basics (root password, ip address, hostname, timezone, etc..) on CactiEZ. This page can give you some quick tips on configuring linux (CactiEZTips). If you are not very comfortable with linux I recommend using Webmin for parts of this step. Don't change the ip address through Webmin until after you've correctly set the gateway. Webmin is already installed on your CactiEZ server. Browse to it http://(cactiez dhcp address):10000. If you have trouble configuring anything at the linux level on your CactiEZ server it will help to know that CactiEZ runs on the CentOS flavor of linux. You should change the timezone from the console in two places. Copy your time zone file from /usr/share/zoneinfo to /etc/localtime. Then edit top line of this file: /etc/sysconfig/clock to reflect the path to your zone file relative to /usr/share/timezone. Example of top line of /etc/sysconfig/clock file: ZONE="PST8PDT". After you get the system time correct. You can run this command to set the hardware clock: "hwclock --systohc"
3. Install SNMPTT or CAMM Plugin for Cacti
Extract the SNMPTT Cacti plugin. The extracted files should contain a folder called "snmptt". Copy this folder to your plugin folder on your CactiEZ serer. An example path for a CactiEZ server should look like this: (/var/www/html/plugins/snmptt). Now login to the web interface of CactiEZ and go to Console > Plugin Management and Install the SNMPTT plugin. The under User Management make sure you have permissions to the newly installed plugin.
4. Install SNMPTT for Linux
Now extract the SNMPTT for Linux package onto your CactiEZ server. I normally extract to /downloads or /temp or something along those lines. Then follow the Unix instructions for Install SNMPTT (Linux / Unix Instructions). After following those instructions. Create the folder /var/spool/snmptt. Then run this command:
(Optional Step)
snmptrapd and snmptt daemons should both start automatically, but sometimes they don't. To fix that add these lines to this file (/etc/rc.d/rc.local):
5. Configure the Linux Firewall
Login to the webmin interface on your CactiEZ server. Choose Networking > Linux firewall. On the last rule click the little blue up arrow to add a new rule. Call it SNMP Traps. Set protocol to UDP and Destination port to 162. Save rule and click apply settings. Note: The CactiEZ install does not contain the latest version of Webmin. To do a quick and easy in place upgrade of webmin from the webmin interface go here: Webmin > Webmin Configuration > Upgrade Webmin.
6. Testing SNMPTT for Linux
If you can't view your traps in The Cacti plugin yet then here are some tips for testing and troubleshooting:
--- Restarting the SNMP service on a Windows machine that is correctly configured to forward traps to your CactiEZ server will generate at least one trap with event name "ColdStart".
--- There should be some logs related to SNMPTT in your log folder (/var/log)
--- Executing the binary files for SNMPTT manually will send errors to standard out instead of a log file. This can sometimes reveal errors that help you figure out how to get things working. (i.e. execute /usr/sbin/snmptthandler or /usr/sbin/snmptt)
--- If you change anything in a related config file I recommend restarting all related services just to be safe. Here are the commands I use:
--- The error about not being able to convet some username to a user id is normal just ignore it.
5. Install MIB Files (This step is important!!)
run the command snmpconf. Use the wizard to create snmp.conf file. Then place the file in /etc/snmp or /usr/share/snmp. My snmp.conf file is located in /usr/share/snmp. Inside this file add the paths to any folders you have that contain mib files (i.e. /usr/share/mibs, /usr/share/snmp/mibs, etc..). Download mibs from the internet for all of your servers. Besure to restart the appropriate services after adding mibs.
This program is also a great companion for SNMPTT. It forwards Windows Event Logs to a syslog server. It can be configured to send information to your CactiEZ server. These events will show up on your 'syslog' tab inside Cacti.
http://ntsyslog.sourceforge.net
Attached Files:
cacti_snmptt_sample_files.zip (4419 downloads)
CactiEZ and SNMPTT Tutorial
Last Updated: 1/4/11Required Downloads:
CactiEZ CD -- Choose from right side of screen.
-- CactiEZ Login Info
SNMPTT for Linux
SNMPTT viewer Plugin for Cacti
CaMM (Cacti Message Management plugin) Replacement for SNMPTT Plugin.
Tutorial
1. Install CactiEZ
Extract the CactiEZ package and burn the ISO to a CD. Insert CD into computer / server and boot from it. Press enter to Start Install. Press enter again to reboot. CactiEZ is now Install! Your new CactiEZ server will grab a DHCP address by default. (Pretty easy huh?)
2. Configure the Sever
Configure the basics (root password, ip address, hostname, timezone, etc..) on CactiEZ. This page can give you some quick tips on configuring linux (CactiEZTips). If you are not very comfortable with linux I recommend using Webmin for parts of this step. Don't change the ip address through Webmin until after you've correctly set the gateway. Webmin is already installed on your CactiEZ server. Browse to it http://(cactiez dhcp address):10000. If you have trouble configuring anything at the linux level on your CactiEZ server it will help to know that CactiEZ runs on the CentOS flavor of linux. You should change the timezone from the console in two places. Copy your time zone file from /usr/share/zoneinfo to /etc/localtime. Then edit top line of this file: /etc/sysconfig/clock to reflect the path to your zone file relative to /usr/share/timezone. Example of top line of /etc/sysconfig/clock file: ZONE="PST8PDT". After you get the system time correct. You can run this command to set the hardware clock: "hwclock --systohc"
3. Install SNMPTT or CAMM Plugin for Cacti
Extract the SNMPTT Cacti plugin. The extracted files should contain a folder called "snmptt". Copy this folder to your plugin folder on your CactiEZ serer. An example path for a CactiEZ server should look like this: (/var/www/html/plugins/snmptt). Now login to the web interface of CactiEZ and go to Console > Plugin Management and Install the SNMPTT plugin. The under User Management make sure you have permissions to the newly installed plugin.
4. Install SNMPTT for Linux
Now extract the SNMPTT for Linux package onto your CactiEZ server. I normally extract to /downloads or /temp or something along those lines. Then follow the Unix instructions for Install SNMPTT (Linux / Unix Instructions). After following those instructions. Create the folder /var/spool/snmptt. Then run this command:
perl -MCPAN -e 'install Config::IniFiles'
When you run the command above you will get a prompt. Just type 'no'. Your snmptt.ini file should be located at /etc/snmp. When configuring that file I recommend sending known and unknown traps all to the same MySQL table (plugin_snmptt). This allows for alerts / rules to work properly even if you don't have the correct mibs for every possible trap.
(Optional Step)
snmptrapd and snmptt daemons should both start automatically, but sometimes they don't. To fix that add these lines to this file (/etc/rc.d/rc.local):
/etc/init.d/snmptrapd start
/etc/init.d/snmptt start
/etc/init.d/snmptt start
5. Configure the Linux Firewall
Login to the webmin interface on your CactiEZ server. Choose Networking > Linux firewall. On the last rule click the little blue up arrow to add a new rule. Call it SNMP Traps. Set protocol to UDP and Destination port to 162. Save rule and click apply settings. Note: The CactiEZ install does not contain the latest version of Webmin. To do a quick and easy in place upgrade of webmin from the webmin interface go here: Webmin > Webmin Configuration > Upgrade Webmin.
6. Testing SNMPTT for Linux
If you can't view your traps in The Cacti plugin yet then here are some tips for testing and troubleshooting:
--- Restarting the SNMP service on a Windows machine that is correctly configured to forward traps to your CactiEZ server will generate at least one trap with event name "ColdStart".
--- There should be some logs related to SNMPTT in your log folder (/var/log)
--- Executing the binary files for SNMPTT manually will send errors to standard out instead of a log file. This can sometimes reveal errors that help you figure out how to get things working. (i.e. execute /usr/sbin/snmptthandler or /usr/sbin/snmptt)
--- If you change anything in a related config file I recommend restarting all related services just to be safe. Here are the commands I use:
/etc/init.d/snmpd restart
/etc/init.d/snmptrapd restart
/etc/init.d/snmptt restart
--- The syslog tab inside the Cacti web interface can sometimes have relevant errors. So check there if all else fails. /etc/init.d/snmptrapd restart
/etc/init.d/snmptt restart
--- The error about not being able to convet some username to a user id is normal just ignore it.
5. Install MIB Files (This step is important!!)
run the command snmpconf. Use the wizard to create snmp.conf file. Then place the file in /etc/snmp or /usr/share/snmp. My snmp.conf file is located in /usr/share/snmp. Inside this file add the paths to any folders you have that contain mib files (i.e. /usr/share/mibs, /usr/share/snmp/mibs, etc..). Download mibs from the internet for all of your servers. Besure to restart the appropriate services after adding mibs.
This program is also a great companion for SNMPTT. It forwards Windows Event Logs to a syslog server. It can be configured to send information to your CactiEZ server. These events will show up on your 'syslog' tab inside Cacti.
http://ntsyslog.sourceforge.net
Attached Files:
cacti_snmptt_sample_files.zip (4419 downloads)
Keywords: cacti tutorial cactiez linux snmptt snmp traps snmpd snmptrapd snmptthandler centos