Showing posts with label SNMP. Show all posts
Showing posts with label SNMP. Show all posts

Thursday, October 17, 2013

FAN, Nagios, Centreon and missing images

More fun today. I finally got snmpd going, but not all things are equal. It's a real struggle depending on the server. Try every option in your snmpd.conf

It is a genuine unadulterated minefield the unprepared, like me !

Anyway, I've started to get the hang of Centreon. I'm sure I am doing things wrong, but hey. It works for me. It's worth getting to grips manually with the different check files so you REALLY understand what they do, why they work, and why they fail.

After a few hours of frustration I realised the check_centreon_remote_storage ripped up my new community string.

Being smug I changed it from public to 'myname_public'

The mod decided it didn't want public ANYWHERE, strips it, and sends the rest. Which is not helpful if you server is set to that community. Throws a bit of a sicky.

In the end I hacked the file to add a print statement and see what it was actually sending - just 'myname_'

Moving switftly on....

When in Nagios I noticed my logs were filling with lots of noise about some missing images.

File does not exist: /var/www/html/images/interface, referer: http://192.168.x.x/nagios/stylesheets/status.css

It seemed to be missing menu_li1.gif and menu_li2.gif (and probably others)

I thought it might be mistake in the css file, but it is also in the cgi files as well.

Easy solution for me :

cp -r /usr/share/nagios/images/interface /var/www/html/images/

All usual warning on permissions et al apply as ever.

I'm not sure if this is a FAN problem, or Centreon or Nagios.

Will stick a post in the forums some place I guess.

Wednesday, October 16, 2013

HP SNMP

I was trying to setup FAN (Nagios + Centreon) to monitor various items on my ML310 G5 server.

I kept getting :

No Such Object available on this agent at this OID

 I could walk the tree locally and remotely but it was clear that I wasn't seeing the HP MIB data

hpasmcli -s "show server"

showed all the data so that was working.

I looked at permissions and a whole pile of things until I found a post that said look at the snmpd.conf file

Lo, there was the answer

As per the book I had used hpsnmpconf to reconfigure snmpd.

At the top it inserted the following lines :

# Following entries were added by HP Insight Management Agents at
#      Tue Oct 15 13:29:45 CEST 2013
dlmod cmaX /usr/lib64/libcmaX64.so
rwcommunity private 127.0.0.1
rocommunity public 127.0.0.1
rwcommunity  private 192.168.10.32
rocommunity  _public 192.168.10.32
trapcommunity trap
trapsink 192.168.10.32 trap
syscontact Me admin@mydomain.net
# ---------------------- END --------------------

The troublesome line was the first :

dlmod cmaX /usr/lib64/libcmaX64.so

I thought I'd check and find where the file was

and lo the answer was :

/usr/lib/libcmaX64.so

Not in /usr/lib

A quick change of path and:

snmpwalk -v2c -c public 127.0.0.1 .1.3.6.1.4.1.232

Suddenly gave me all the info !

Clearly a bug with their Debian installer.