Showing posts with label Zenoss. Show all posts
Showing posts with label Zenoss. Show all posts

Monday, February 8, 2010

SNMP on grml/debian

I've been adding some additional servers into my Zenoss system. As most of my Linux boxes are running CentOS Linux, adding them in is no problem.

But I have one grml system. Why different? I had downloaded an appliance from the vmware community site. I needed a bugzilla system - there was one ready built - it seemed like a good idea at the time!

So,...
I had checked that snmp was installed on the system.
I had edited the /etc/snmp/snmpd.conf file to include the settings I wanted.
I had started the snmpd service.

But I couldn't perform an snmpwalk from my zenoss server and couldn't add it as a device into Zenoss!

Some digging with netstat revealed that port 161 was only listening for the localhost/127.0.0.1! Which was confusing because I wasn't configuring it to be like that.

Where was it picking that up from?

A quick google, quickly found these two sites, HowToForge & DebianWiki with essentially the same information.

There are some default setting in /etc/default/snmpd including the value of the environment variable SNMPDOPTS.
Out of the box, it is set to
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
which I chenged to
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'

I restarted the snmpd service and checked the result from netstat -an
Huzzah!

I checked the snmpwalk and saw screeds of stuff fly up my console. And lastly, I successfully added the box into zenoss.

And that's that!

Sunday, February 7, 2010

Webmin Usage

I almost called this post "Deskilling in IT #2", but I've changed my mind. My previous blog about deskilling dealt more about my change in attitude to the way to build and deploy customised server. With this blog it is really the manner in which the web interface is an enabler of complex server configuration without knowledge of the underlying command line options.

To set the scene, I had an rPath Mediawiki appliance which was configured to provide 4 separate wikis. The conary package management system had stopped working some time ago.- possibly something I did - and every now and again was filling up the / partition (the only partition). I couldn't add SNMP to it - well not easily. So remote management was fraught!

To resolve the issues, I built a new CentOS Linux v5.4 server with Apache and MySQL installed; configured SNMP so it could be added into our Zenoss monitoring system; copied the last night's mysqldump backup files across to the new server; copied the webpages across; copied the appropriate .conf files to /etc/httpd/conf.d/; installed webmin.
Through webmin, I then:
  • created new databases for each of the wikis;
  • added the individual database users for the wikis;
  • added the database access rules for each of the database users
  • loaded the tables and data from the previous nights backup
  • started the Apache service

All that took only a few minutes. And it was up and working.
Obviously starting the Apache service was simply a "service httpd start" with possibly a "chkconfig httpd on" beforehand.
The database actions are not beyond my wit to discover, either by reading the documentation on the MySQL website or indeed in terms of going through the source code for webmin and the mysql module. But with webmin, I did not have to either look them up online or in my notebook.

Perhaps, the only thing that seemed to be harder to configure through webmin is the iptables based Firewall. I much preferred to just edit the /etc/sysconfig/iptables file and enter service iptables restart. Myabe that is because generally, the edits I make are pretty simple involving only copy and pastes of lines and then just changing the port number.

Webmin makes it easier to administer many parts of *nix systems if you already know what you are doing. If you do not know what you are doing, it is just as difficult as previously.

I like webmin's facility to create links from one webmin installation to one or more other installations. My zenoss server is also a ssh jump server to other *nix systems, particularly those in the local DMZ. Making it also a console for the webmin consoles is just a logicial next step. Although to increase security even further, I'm considering tunnelling the access to the webmin port 10000 though SSH.