Posts Tagged ‘Cacti’

CactiEZ password reset

Thursday, September 4th, 2008

While ago I installed CactiEZ 4.0 as a virtual machine on my Hyper-V server and forget the admin password to login into the web interface. I installed the system and didn’t to finish the configuration. When you install CactiEZ and logon for the first time with username ‘admin’ you are required to change the password.

Now my access was blocked.
image 

To reset the admin password logon on the appliance console and run the following command lines:

  • mysql cacti
  • update user_auth set password(md5)=’admin’ where username=’admin’;

image

This will reset the admin password and allow you to login into the webinterface.

Related links:

Cacti RRD graphs are not updated and the application slow

Thursday, April 17th, 2008

image I have two identical Cacti (0.8.6h) virtual machines and both based on CactiEZ version 1 installation. I have been migrating the virtual machines between different Vmware hosts  and at some point my second Cacti appliance did not update the RRD graphs and using the web interface was very slow. I tried rebooting; changing parameters in the Configuration Settings but noting helped to solve the issues. I even tried to bring the virtual machine on the original vmware host and I had same symptoms.

I logged in with a SSH session and went to my cacti database folder. I did a list and reviewed the file structure.

Shell> cd /var/lib/mysql/cacti
Shell> ls -all
-rw-rw—- 1 mysql mysql 303340164 Apr 15 09:32 poller_output.MYD
-rw-rw—- 1 mysql mysql 119115776 Apr 15 09:32 poller_output.MYI

As you can see the poller_output.MYD and poller_output.MYI are too huge and mysqld used a lot of resources. Total size of two files 366MB and my physical memory assigned to this virtual machine was only 384MB.

image

I read couple posts on the Cacti forms and decided to clean up my poller_output table from shell.

Shell> mysqld
mysql>use cacti mysql>
delete from poller_output;
mysql>exit

(more…)

Use Cacti to monitor your network latency

Sunday, February 3rd, 2008

If you are managing and monitoring a network you will probably be interested to keep an eye on the latency of your network links. Especially for those links which are connected with a dedicated internet connection and a IPSec VPN tunnel to the datacenter. Latency is predictable but for non private IP VPN links without reserved bandwidth and QoS/CoS it sometimes may help solve some problems or rethink and discuss high latency with the service provider. With dedicated Framerelay/Leased Line/IP VPN network links you can agree with the service provider on the different latency values and have SLA’s in place.

Latency in a packet-switched network is measured either one-way (the time from the source sending a packet to the destination receiving it), or round-trip (the one-way latency from source to destination plus the one-way latency from the destination back to the source). Round-trip latency is more often quoted, because it can be measured from a single point. Note that round trip latency excludes the amount of time that a destination system spends processing the packet. Many software platforms provide a service called ping that can be used to measure round-trip latency. Ping performs no packet processing; it merely sends a response back when it receives a packet (i.e. performs a no-op), thus it is a relatively accurate way of measuring latency.

http://en.wikipedia.org/wiki/Latency_%28engineering%29

I am using CactiEZ v0.3 to address this issue and monitor the ping latency. Those hosts may or may not be a SNMP enabled device. If the router is service provider managed than you probably won’t be able to get any access to SNMP, but for this we don’t need it.

a) Create new device in Cacti Management console. See example for www.networknet.nl

image

b) Choose for Availability “Ping” and use “ICMP” ping as method. Click Add and reopen the device.

c) Locate Associated Graph Templates and choose “Unix-Ping Latency” in the Graph Templates. Click Add.

image

d) Click “*Create Graphs for this Host”

e) Select “Create: Unix – Ping Latency” graph template and click Create.

f) Choose Red as legend color and click Create. + Created graph: www.networknet.nl – Ping Latency is now created.

i) Create new Graph Tree and add the new created graph for the network latency. See my example.

image

The result:

image

CactiEZ 0.30 Device Tracking Management error save failed

Tuesday, January 29th, 2008

After installing CactiEZ 0.30 and you start using the Device Tracking Management (MacTrack plugin) area you may receive the following error when creating new site or device.

2008-01-29_134623

Error: save Failed.

 

This error is being generated by the Cacti system because there are no tables in the Cacti database.

Login on the console or with a ssh shell and execute the following commands

cd /var/www/html/plugins/mactrack

php database_upgrade.php

2008-01-29_135443

I have couple other issues after scanning a cisco switch, which I will need to follow up on the cactiusers.org forum. The device type list is empty in the newest version of CactiEZ and you will need to populate this yourself now.

CactiEZ 0.3 download and install tutorial VMWare Workstation

Sunday, January 27th, 2008

In this tutorial I am going to show you how easy it is to install CactiEZ appliance and run this as a virtual guest appliance in VMWare Workstation. After the installation the virtual guest is portable and can be moved to a VMWare Server installation. Note from http://cactiusers.org what CactiEZ appliance is. If you never heard or used this open source monitoring tool than now it is the time to get this thing up and running.

CactiEZ is the fastest possible way to get up and running with Cacti. CactiEZ is an auto-installing CD based on CentOS 4.3∞. The disk is a completely remastered CD (from the 4 CD version, not the Server CD) and stripped down to the bare essentials (no GUI). The CD weighs in at roughly 355 Megs, and installed is roughly 855 Megs. At only 305 packages, it still includes a preconfigured firewall (only allowing http, https, ssh, netflow, webmin, and remote Syslog).

Go to http://cactiusers.org/downloads/ and download the latest CactiEZ 0.3 stable appliance.

image

Current size of the zipped file is 292MB. Save it and extract the files with your favorite tool. I use WinRAR, but the 7z will also do the job .

Create new virtual machine based on Red Hat Enterprise Linux 3 and use all defaults; for the virtual disk I assigned 64GB.

image

Open the properties of the cd-rom drive and locate the CactiEZ iso file.

image 

Start the virtual guest machine. Press enter and watch the show. My installation took me 3 minutes.

1 2

3 4

Login and use the root/CactiEZ to login. Change the password with passwd command! Rule of thumb is to always change the default passwords.

netstat -an | grep “LIST” will show all listining ports on the appliance.

image

22 (SSH), 80 (HTTP), 443 (HTTPS) and 10000 (webadmin) are important tcp (L4) ports. Go to http://ipaddress and login with admin/admin. Change the password.

Cacti is ready for use.

clip_image001

Check the CentOS and VMWare tools post how to install them from SSH shell.

CentOS Cacti Appliance (CactiEZ) and snmp configuration

Tuesday, January 8th, 2008

I am running CactiEZ VMWare appliance for a while and couple of graphs I was looking for were not integrated in the SNMP configuration.

CactiEZ is based on CentOS linux distribution.

Verify SNMP Daemon is running

<br>[root@CACTI-04 /]# ps -ef | grep snmp<br>root 29283 1 0 Jan06 ? 00:00:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd -a<br>[root@CACTI-04 /]#<br>

Rename the default configuration file

<br>[root@CACTI-04 /]# mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.org<br>[root@CACTI-04 /]# ls /etc/snmp/<br>snmpd.org<br>[root@CACTI-04 /]#<br>

Create new file with your own SNMP configuration

<br>[root@CACTI-04 /]# vi /etc/snmp/snmpd.conf<br>###########################################################################<br>#<br># snmpd.conf<br>#<br># - created by the snmpconf configuration program<br>#<br>###########################################################################<br># SECTION: System Information Setup<br>#<br># This section defines some of the information reported in<br># the "system" mib group in the mibII tree.<br># syslocation: The [typically physical] location of the system.<br># Note that setting this value here means that when trying to<br># perform an snmp SET operation to the sysLocation.0 variable will make<br># the agent return the "notWritable" error code. IE, including<br># this token in the snmpd.conf file will disable write access to<br># the variable.<br># arguments: location_string</p> <p>syslocation NETWORKNET<br># syscontact: The contact information for the administrator<br># Note that setting this value here means that when trying to<br># perform an snmp SET operation to the sysContact.0 variable will make<br># the agent return the "notWritable" error code. IE, including<br># this token in the snmpd.conf file will disable write access to<br># the variable.<br># arguments: contact_string</p> <p>syscontact Ivan Versluis<br>###########################################################################<br># SECTION: Access Control Setup<br>#<br># This section defines who is allowed to talk to your running<br># snmp agent.<br># rocommunity: a SNMPv1/SNMPv2c read-only access community name<br># arguments: community [default|hostname|network/bits] [oid]</p> <p>rocommunity net_ro_public<br>###########################################################################<br># SECTION: Agent Operating Mode<br>#<br># This section defines how the agent will operate when it<br># is running.<br># agentaddress: The IP address and port number that the agent will listen on.<br># By default the agent listens to any and all traffic from any<br># interface on the default SNMP port (161). This allows you to<br># specify which address, interface, transport type and port(s) that you<br># want the agent to listen on. Multiple definitions of this token<br># are concatenated together (using ':'s).<br># arguments: [transport:]port[@interface/address],...</p> <p>agentaddress 127.0.0.1:161</p> <p>ESC and :wq! to save and exit the file.<br>

Reload the snmpd.conf file and verify the SNMP configuration with snmpread

</p> <p>[root@CACTI-04 /]# service snmpd reload</p> <p>Reloading snmpd: [ OK ]</p> <p>[root@CACTI-04 /]#</p> <p>

Open the Cacti Devices and choose to add new host.

 

clip_image002

After new device has been added and the new CentOS device is being reopened the device should show the SNMP configuration like mine.

CACTI-04 (127.0.0.1)

SNMP Information
System: Linux CACTI-04.almatis.internal 2.6.9-34.EL #1 Wed Mar 8 00:07:35 CST 2006 i686
Uptime: 12822505
Hostname: CACTI-04.networknet.nl
Location: NETWORKNET
Contact: Ivan Versluis

Last step would be to create new graps. Depending on the host template choosen cpu, memory and nic graps can be created.

NIC

clip_image004

CPU

clip_image006

Memory

clip_image008