evolution creations
when you put your mind to it, anything is possible
when you put your mind to it, anything is possible
Aug 18th
So after coming back from holiday’s the only box that was on my network was my Linux router/server/firewall. In powering up all the other Windows machines two of them came back online ok and started reporting graphs, but my main Windows box didn’t. The error when I went into Cacti Admin > Console > Devices > The Device was: SNMP Error right under the upper left corner of the window under SNMP Information.
The first thing that I went to check was under Control Panels > Administrative Tools > Services and verified that the SNMP Service and SNMP Trap were both set to automatically start, and are both running. I went in to check the configuration of the SNMP service and the IP address that it was set to report to is correct and the community is fine.
So to break through all the walls here, the first test that you should run is:
snmpwalk -Os -c public -v 1 xxx.xxx.xxx.xx system
Replace the XXX’s with the actual internal IP address. Now what’s interesting for me is that my main box has two NIC’s on it; 192.168.1.8 and 192.168.1.20. When I ran the test against the first IP address, I received the below error:
george@otani:~$ snmpwalk -Os -c public -v 1 192.168.1.8 system
Timeout: No Response from 192.168.1.8
But when I ran it against the 192.168.1.20 IP, I received a response:
george@otani:~$ snmpwalk -Os -c public -v 1 192.168.1.20 system
sysDescr.0 = STRING: Hardware: x86 Family 6 Model 15 Stepping 11 AT/AT COMPATIBLE – Software: Windows Version 6.0 (Build 6001 Multiprocessor Free)
sysObjectID.0 = OID: enterprises.311.1.1.3.1.1
sysUpTimeInstance = Timeticks: (216315) 0:36:03.15
sysContact.0 = STRING:
sysName.0 = STRING: COMPUTERNAME
sysLocation.0 = STRING:
sysServices.0 = INTEGER: 76
This boils down to a firewall or some sort of block that is causing this error. If you don’t have two NIC’s, start with troubleshooting it at the local firewall level or at your router level. But changing the device IP from 192.168.1.8 to 192.168.1.20, I received the following within Cacti:
GEORGE-INTEL-DESKTOP (192.168.1.20) SNMP Information
System: Hardware: x86 Family 6 Model 15 Stepping 11 AT/AT COMPATIBLE – Software: Windows Version 6.0 (Build 6001 Multiprocessor Free)
Uptime: 218222 (0 days, 0 hours, 36 minutes)
Hostname: COMPUTERNAME
Location:
Contact:
Aug 3rd
For all you MMO fans, look no further! We all suffered a terrible loss at the grand platform that Age of Conan had promised, but in terms of a more mature level of MMO gameplay, Bloodymare seems to have fit the bill.
I haven’t gotten that far into the game, but leveling appears to be quite easy. I actually think that the game isn’t very quest based, as the initial quests seem very simple, but when you get out to the world and start fighting the creatures, it becomes very very apparent what the game is all about. Great graphics, and intuitive gameplay, this is definitely one that any MMO fan should try out!
The only downside that I can see so far is the fact that the game install file is like 2.5GB in size! But getting past that, you’ll love the game, I know I certainly have gotten into it!
Jul 28th
For many months, we have waited and waited–and WAITED for Nickelodeon to do something with the show: The Avatar: The Last Air Bender. This was in the beginning a first for an American cartoon shop, as the style and story were more similar to their Japanese counterparts, than they were to typical American toons. This is part of the reason why this show, in my opinion, caught on so quickly.
Quickly isn’t always the best, as this was seen as the release of episodes from season to season and within a season began to slow at an extrodinary rate. So much so that you began to wonder are they going to keep it going?
For those who don’t follow Japanese anime, you typically find anime fall into:
Given the number of episodes that the Avatar had and the power of the story, it would have been easy in my opinion for them to take this toon and carry it on for 100+ episodes. What American tooners aren’t use to are story arcs, arcs that divert from the main story line and come back or not, and intertwin and unravle and all kinds of things! This is what makes shows like Naruto be able to continue on for 250+ episodes with no sight in end as to when they will be done. Now keep in mind, that within those episodes there are episodes that you just want to pull out your hair and think to yourself, OMG won’t they bloody end these things!
But nonetheless, the show is now over. In an impressive last 4 episodes regarding Sozens Comet, the show came to a peaceful ending with most of the loose ends wrapped up. It’s what I would consider to be a fairy tale ending. Nothing compared to the heart wrenching ending that say shows like Full Metal Alchemist have, things that have reply values of LESS than 1! But are nonetheless AWESOME anime that are at the top of my all time favor list.
Jul 28th
So for anyone that knows me, you will know that I have turned into an old man! That is to say that I’m plagued with so many “things” that it seems like I should be 50+ years old in age. But alas, I’ve been plagued with the misfortune that so many American’s are faced with–that is to get a good nights sleep.
How difficult this was, I was at a point where I was taking over the counter sleep aids practically each night, in order to achieve sleep. So the wife and I have been debating over the past year and a half whether or not to get a new bed–specifically whether to invest in a Tempurpedic. Let’s face it, getting a bed is a big investment, as big as say a new big screen, or computer, or electronic gizmo or widget. So it’s sufficient to say that you shouldn’t go into this investment lightly!
But when you do find the right time and get everything in order, this was an AWESOME investment for us! Some things to be aware of:
All in all, we are very impressed with this decision. It has worked out well and I find myself staying asleep and in fact it’s hard for me to wake up some times because I’m so comfortable in sleep–not that I can’t wake up because I haven’t had enough sleep. It’s a wonderful feeling, but keep in mind, this doesn’t take away from the fact that you should have a decent amount of steady sleep each day, so remember to get at least 6-8 hours, this does help a lot!
Jul 17th
On the new Apache2 instance that I have running Cacti, I ran into a problem where I get the error message:
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
To fix this, I have to add the following line into the /etc/apache2/httpd.conf file:
ServerName nameofserver
Replace nameofserver with the actual name of the server that you want to have Apache configured under.
Jul 13th
So to jazz things up again, I wanted to move away from the PHP poller, and install Spined, which is the poller daemon that can be used instead of the PHP program and is much more efficient for larger systems.
To start with, you want to download the latest version of Spine from the website here. Once you have downloaded the tar ball (I downloaded it to my /home/george directory (you will want to change george to whatever your current user is)), and run:
tar zxvf cacti-spine-0.8.7a.tar.gz
and then you want to:
cd cacti-spine-0.8.7a
From this directory, you will need to run:
./configure
Now when I did this, I got into loads of problems, because it was telling me that:
error: cannot run /bin/bash conifg/config.sub
To get around this, I had to run:
sudo apt-get install libmysqlclient15-dev libsnmp9-dev automake libtool
Then I was able to run:
aclocal
libtoolize –force
autoconf
autoheader
automake
./configure
In that order. Each of the above lines needs to be run separetely. Once you successfully run the ./configure, you can run:
make
to make the binary. Now once that has gone through for you, you will need to create a directory:
sudo mkdir /usr/local/spine
and then execute:
sudo cp spine* /usr/local/spine
This will move the spine binary and spine.conf files from your /home directory to the /usr/local/spine directory.
Then you want to run:
sudo joe /usr/local/spine/spine.conf
and modify the configuration to the proper settings for your cacti database instance. If you used my previous guide your information should be:
DB_Host localhost
DB_Database cacti
DB_User cacti
DB_Pass xxxxxx
DB_Port 3306
You will replace the xxxxxx with the password that you setup for your Cacti database during the installation.
Finally you will need to login to Cacti, and go to Console > Settings > Paths, and modify the path for Spine under the Alternative Poller Path section:
/usr/local/spine/spine
When you click on save, the words under the path field for Spine should read:
[OK: FILE FOUND]
Then you will want to click on the Poller tab and set this from cmd.php to spine and save your settings. This should be it and you should be using Spine as your poller!
Jul 13th
So I’ve had the WORST luck in trying to figure out how to setup Cacti on Ubuntu so it will properly poll my system and give me graphs. Part of the reasoning behind this is that I’m in the process of replacing my existing Netgear router with a Ubuntu box (guide to come shortly!) but a prereq of doing this is to setup reporting on the Ubuntu box so I can see all kinds of metrics on disk, IO, network bandwidth, etc–all the fun stuff that makes you jump up and down with. My previous attempts went through fine, but the problem was that I didn’t seem to be able to get stats polled from my devices, namely network interfaces.
To begin with always make sure your system is up2date:
sudo apt-get update
sudo apt-get upgrade
Now that we have that out of the way, make sure your system has SNMPD installed:
sudo apt-get install snmp snmpd
Now that it is installed, we need to do a bit of configuration to it. Run:
sudo nano /etc/default/snmpd
and you’ll see something like:
# This file controls the activity of snmpd and snmptrapd# MIB directories. /usr/share/snmp/mibs is the default, but
# including it here avoids some strange problems.
export MIBDIRS=/usr/share/snmp/mibs# snmpd control (yes means start daemon).
SNMPDRUN=yes# snmpd options (use syslog, close stdin/out/err).
SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid’# snmptrapd control (yes means start daemon). As of net-snmp version
# 5.0, master agentx support must be enabled in snmpd before snmptrapd
# can be run. See snmpd.conf(5) for how to do this.
TRAPDRUN=no# snmptrapd options (use syslog).
TRAPDOPTS=’-Lsd -p /var/run/snmptrapd.pid’# create symlink on Debian legacy location to official RFC path
SNMPDCOMPAT=yes
Make sure that you change:
SNMPDRUN from No to Yes, and you remove the 127.0.0.1 from the SNMPDOPTS line. You’ll see what I’m saying when you compare yours to mine that you see above that I’ve made bold.
Then we are going to configure the communities by running:
sudo nano /etc/snmp/snmpd.conf
Do a search within the conf file and you should see:
# sec.name source community
#com2sec paranoid default public
com2sec readonly localhost public
#com2sec readwrite default private
By default the first line is the one that is commented and the last two are uncommented. I mearly commented out the first line (its the one in italics) and removed the comment from the second line. Also I changed the source from default to localhost and left the community name as public.
Now comes the test, you want to make sure that snmp is up and running. Since changes were made to the configuration you want to give those services a swift kick in the pants:
sudo /etc/init.d/snmpd restart
Once that is done you’ll want to run:
snmpwalk -Os -c public -v 1 localhost system
You should get a mess of information returned:
sysDescr.0 = STRING: Linux otani 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008 i686
sysObjectID.0 = OID: netSnmpAgentOIDs.10
sysUpTimeInstance = Timeticks: (227377) 0:37:53.77
sysContact.0 = STRING: Root(configure /etc/snmp/snmpd.local.conf)
sysName.0 = STRING: otani
sysLocation.0 = STRING: Unknown (configure /etc/snmp/snmpd.local.conf)
sysORLastChange.0 = Timeticks: (0) 0:00:00.00
sysORID.1 = OID: snmpFrameworkMIBCompliance
sysORID.2 = OID: snmpMPDCompliance
sysORID.3 = OID: usmMIBCompliance
sysORID.4 = OID: snmpMIB
sysORID.5 = OID: tcpMIB
sysORID.6 = OID: ip
sysORID.7 = OID: udpMIB
sysORID.8 = OID: vacmBasicGroup
sysORDescr.1 = STRING: The SNMP Management Architecture MIB.
sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching.
sysORDescr.3 = STRING: The management information definitions for the SNMP User-based Security Model.
sysORDescr.4 = STRING: The MIB module for SNMPv2 entities
sysORDescr.5 = STRING: The MIB module for managing TCP implementations
sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations
sysORDescr.7 = STRING: The MIB module for managing UDP implementations
sysORDescr.8 = STRING: View-based Access Control Model for SNMP.
sysORUpTime.1 = Timeticks: (0) 0:00:00.00
sysORUpTime.2 = Timeticks: (0) 0:00:00.00
sysORUpTime.3 = Timeticks: (0) 0:00:00.00
sysORUpTime.4 = Timeticks: (0) 0:00:00.00
sysORUpTime.5 = Timeticks: (0) 0:00:00.00
sysORUpTime.6 = Timeticks: (0) 0:00:00.00
sysORUpTime.7 = Timeticks: (0) 0:00:00.00
sysORUpTime.8 = Timeticks: (0) 0:00:00.00
If you get something else like:
Timout: No response from Localhost
Go back and make sure you’ve setup your communities properly and restart SNMPD from the /etc/init.d/snmpd restart command.
Next you are going to want to setup your web and MySQL server’s. If you’ve already done this great, but for those who are starting on a vanilla installation, go ahead and run the following:
sudo apt-get install mysql-server apache2 libapache2-mod-php5 php5-mysql php5-cli php5-snmp
You’ll need to test that Apache and PHP are up and running, so run:
sudo joe /var/www/phpinfo.php
and type in the phpinfo bit (unfortunately it won’t properly display through Blogger if I type in the code, but you can always find it here on how to create a test page).
Save your file and go to: http://localhost/phpinfo.php and if you get the PHP info page, you are all set there!
Next you’ll want to install phpmyadmin. It’s not a requirement, but I always do this so you have a graphical interface to manage your MySQL instance:
sudo apt-get install phpmyadmin
And you can test that this is running by going to: http://localhost/phpmyadmin and logging in with root as the username and the password you setup during the installation process of MySQL above.
Now that we have that squared away, we want to install Cacti using:
sudo apt-get install cacti
The installation process is fairly straight forward. You will be asked:
So now that cacti has been installed and we are trucking right along, we’ll want to pull up the web installer: http://localhost/cacti. You have to go through the web-based installer process:
When you get to the login page, your default credentials on the first run are:
Obviously be a good boy and on the next screen make sure you change this to something proper. This will be the admin password that you change, so make it a good one!
Now comes the fun part, you are going to setup graphs! But before you can get to that you have to understand the process by which you set things up:
This is the part that I got stumbled up on for awhile as it’s not the most intuitive system to go through. So to start with click on Console from the upper right corner, and click on the link labeled Create devices for network.
There should already be a device there, but go ahead and delete it and create a new one from scratch. (The Add button to add a new one is in the upper right hand corner of the frame). In the add menu, there will be several fields that you need to fill in:
When you select SNMP version to 1, additional options will open up for you:
Once you have that click on Create to create your device. After you click on create, the device will refresh with additional options at the bottom for:
If you scroll to the top of the frame, you’ll see a link labeled Create Graphs for this Host. Click on the link to get you to the next screen. Under Graph Templates, select the check boxes next to:
Under Data Query [SNMP - Interface Statistics], click on the drop down menu and select In/Out Bits with Total Bandwidth and click the Create button.
We’re almost there. We have to either first create a tree to associate this new device to, or we have to associate this device to an existing tree. By default, Cacti will install with a Default Tree. And for those like me, who are setting this up on one box, and this will be the only box that Cacti monitors, we can skip creating a new tree and go straight to associating this to an existing tree. If you want to create your own tree, it’s simply a matter of clicking on the Graph Trees link on the left menu, and adding a new tree with a new name.
To associate your device with a tree, it’s simply just clicking on the Devices link on the left menu, and clicking the checkbox next to your device, and from the drop down menu select Place on Tree (Default Tree) and click on the Go button. You’ll be asked to confirm, just confirm with default values and that’s it!
If everything went well within a few minutes you should have some graphs being generated!
Jul 6th
As many of you guys have probably seen the movie Contact, or watch James Bond slide down the rim of the massive dish in Goldeneye, what you probably don’t know is that this wonderful invention and tool of the cosmos is at risk of seeing the absolute end of all things–itself. It’s own end is at risk here because of funding issues from OUR GOVERNMENT!
Now I plead with all of you, do the right thing, take the 10 minutes of your day to complete this petition and the stamps that it takes to send it to your representatives, and LET THEM KNOW that we the people of this great nation, pursuers of science and exploration demand of our government to stop spending BILLIONS on the war (in fact an additional $162 Billion has been provided for this) and start spending money on things that will lead this great nation to the next frontier–one that doesn’t have war between fellow people as the prime driver for technological advances.
So do me a favor and go to this website:
http://setiathome.berkeley.edu/arecibo_letter.php
and put your information in, enter the full zip code include the 4 digits at the end (the page has a link that you can look this up with), and send your letters to your respective representatives. This time the powers that be have gone too far, in pursuit of all the wrong things, and we watch with splendor as they continue on this track without any regard for what those consequences are. Here and now we can make the stand and for something that we all know and appreciate can save this for future generations to come.
Jul 6th
So my one Ubuntu server box after the last server update died and never came back to life. It was on an old IBM Intellistation P4 box, and the POST beep codes tell me that it’s either the system RAM or the system board. Since neither I’m in a position where I’m about to pour more cash into, I decided to just put a Ubuntu VM on my main box and go from there. After all the main box these days seems to be just idling away, so why not!
The problem was that I couldn’t remember how to mount a network drive, so it booted up at startup. After a few minutes of souring and trying a few things, came across the answer.
First run the following command:
sudo apt-get install smbfs
This will install the Samba File System, but more importantly it will also install the smbmount application.
Test to make sure that you can from the machine that you are setting up the mount point reach the network file system. You can do this via the command:
sudo smbmount //servername/directory /mountpoint -o username=putusernamehere,password=putpasswordhere
Obviously replace the necessary values above with the real information. Mine looks like:
sudo smbmount //192.168.1.7/public /storage -o username=george,password=xxxxxxxxx
Doing this, I received the error message:
mount error: can not change directory into mount target /storage
This is resolved by simply running the command:
sudo mkdir /storage
To add this mount point to your startup you will first backup your fstab file:
sudo cp /etc/fstab /etc/fstab_backup
once that is backed up, you will:
sudo nano /etc/fstab
Add in the following line:
//servername/directory /mountpoint smbfs username=putusernamehere,password=putpasswordhere 0 0
Mine looks like:
//192.168.1.7/public /storage smbfs username=george,password=xxxxxxxxx 0 0
Then writeout the file and exit nano, and run:
sudo mount -a
This will reload the mount points and if successful you will have full access to your network drive via the /storage directory!
Jul 6th
Some distributions run a caching nameserver in the background out of the box while some do not. To clear the cache if you have such a daemon running, simply restart the nscd service in ubuntu.
Most DNS clients will cache the results of name resolution request to speed up multiple lookups to the same URL. Just think about how many requests are made to the same domain when visiting a single web page. Every file, image, style sheet, etc. that is on that page and served from the same domain requires a DNS lookup.
So if you have an invalid DNS entry cached on your local client you’ll need to flush it out of the cache so your client can do a new lookup and get the correct information. Or your other option is to wait until that DNS entry expires and the cache flushes it automatically… which typically takes about 24 hours.
In ubuntu if you want to flush DNS cache you need to restart nscd daemon
Install nscd using the following command
sudo aptitude install nscd
Flush DNS Cache in Ubuntu Using the following command
sudo /etc/init.d/nscd restart