Oh also, this is how I setup snmp for those, like me, that don't know how.
apt-get update
apt-get install snmp snmpd
cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig
nano /etc/snmp/snmpd.conf
rocommunity public
syscontact admin
syslocation Savvis
#Zen Load Balancer Farm Connection Scripts
exec magic-closed /usr/local/zenloadbalancer/app/zenrrd/snmp-magic-closed.sh
exec magic-pen /usr/local/zenloadbalancer/app/zenrrd/snmp-magic-pen.sh
exec magic-est /usr/local/zenloadbalancer/app/zenrrd/snmp-magic-est.sh
From: Justin Kuntz
Sent: Friday, March 15, 2013 1:10 PM
To: Justin Kuntz; [email protected]
Subject: Current Connections Script
This is emilio's farm-rrd.pl script with all the rrd stuff stripped out to
output just the connection information.
Now the hard thing for me was to run this via snmp, snmp needs a suid to run
perl and I wasn't comfortable doing that. so what I ended up doing was running
a bash script and a crontab to run every minute with the following:
#!/bin/bash
out=$(/usr/bin/perl /usr/local/zenloadbalancer/app/zenrrd/farm-snmp.pl)
echo "$out" > /usr/local/zenloadbalancer/app/zenrrd/snmp.out
which puts all the output to the snmp.out file. After that I create an
additional script for each item I wanted to graph. This one for instance grabs
the farm name "MagicYellow" then grabs the third line for "Closed connections"
and then strips all text and returns only numerical values.
cat /usr/local/zenloadbalancer/app/zenrrd/snmp.out | sed -n '/MagicYellow/
{n;n;n;p}' | sed 's/[^0-9]*//g'
Once I had each farm and data bash script create I went ahead and put this into
my snmpd.conf file
exec magic-closed /usr/local/zenloadbalancer/app/zenrrd/snmp-magic-closed.sh
After restarting the snmpd service I ran the following to obtain my OID for the
exec command I had put
snmpwalk -On -v2c -c public localhost .1.3.6.1.4.1.2021.8
Return
.1.3.6.1.4.1.2021.8.1.1.1 = INTEGER: 1
.1.3.6.1.4.1.2021.8.1.1.2 = INTEGER: 2
.1.3.6.1.4.1.2021.8.1.1.3 = INTEGER: 3
.1.3.6.1.4.1.2021.8.1.2.1 = STRING: magic-closed
.1.3.6.1.4.1.2021.8.1.2.2 = STRING: magic-pen
.1.3.6.1.4.1.2021.8.1.2.3 = STRING: magic-est
.1.3.6.1.4.1.2021.8.1.3.1 = STRING:
/usr/local/zenloadbalancer/app/zenrrd/snmp-magic-closed.sh
.1.3.6.1.4.1.2021.8.1.3.2 = STRING:
/usr/local/zenloadbalancer/app/zenrrd/snmp-magic-pen.sh
.1.3.6.1.4.1.2021.8.1.3.3 = STRING:
/usr/local/zenloadbalancer/app/zenrrd/snmp-magic-est.sh
.1.3.6.1.4.1.2021.8.1.100.1 = INTEGER: 0
.1.3.6.1.4.1.2021.8.1.100.2 = INTEGER: 0
.1.3.6.1.4.1.2021.8.1.100.3 = INTEGER: 0
.1.3.6.1.4.1.2021.8.1.101.1 = STRING: 22
.1.3.6.1.4.1.2021.8.1.101.2 = STRING: 0
.1.3.6.1.4.1.2021.8.1.101.3 = STRING: 0
.1.3.6.1.4.1.2021.8.1.102.1 = INTEGER: noError(0)
.1.3.6.1.4.1.2021.8.1.102.2 = INTEGER: noError(0)
.1.3.6.1.4.1.2021.8.1.102.3 = INTEGER: noError(0)
.1.3.6.1.4.1.2021.8.1.103.1 = STRING:
.1.3.6.1.4.1.2021.8.1.103.2 = STRING:
.1.3.6.1.4.1.2021.8.1.103.3 = STRING:
Now I can easily see that the .1.3.6.1.4.1.2021.8.1.101.1 is the value that I
want to report on. So when you go to deploy my template you will see a field
for 'Custom Data [Template: ZenLB-Closed]' just enter the oid the snmpwalk
returned for the value and that's it, now you have zenLB graphed in cacti.
That was fun.... :\ haha
From: Justin Kuntz
Sent: Friday, March 15, 2013 12:56 PM
To: Justin Kuntz;
[email protected]<mailto:[email protected]>
Subject: Cacti Graphing
Created a graph template for Cacti.
From: Justin Kuntz [mailto:[email protected]]
Sent: Thursday, March 14, 2013 5:42 PM
To:
[email protected]<mailto:[email protected]>
Subject: Re: [Zenloadbalancer-support] SSH into server v 3.02
I like it but I would like to see the zen team implement SNMP natively.
Otherwise we really have no way to alert or monitor centrally.
>From my Android phone on T-Mobile. The first nationwide 4G network.
-------- Original message --------
From: Steve Mosher <[email protected]<mailto:[email protected]>>
Date:
To:
[email protected]<mailto:[email protected]>
Subject: Re: [Zenloadbalancer-support] SSH into server v 3.02
Good find Justin
Thank you!
Steve Mosher
On Mar 14, 2013, at 1:07 PM, Justin Kuntz
<[email protected]<mailto:[email protected]>> wrote:
Thanks, just so everyone else can see.
If you guys take the pl scripts Zen has created you can add it to your
snmpd.conf file ( /etc/snmp/snmpd.conf) by doing the following:
exec Zen-CPU /usr/local/zenloadbalancer/app/zenrrd/cpu-rrd.pl
For more information check out this tutorial
http://en.doc.centreon.com/HowToUseSNMPAgentExtension
And here is a link for creating custom graphs within Cacti
http://www.cacti.net/downloads/docs/html/graph_snmp_oid.html
From: Laura Garcia [mailto:[email protected]]
Sent: Thursday, March 14, 2013 10:58 AM
To:
[email protected]<mailto:[email protected]>
Subject: Re: [Zenloadbalancer-support] SSH into server v 3.02
Hi, you can find the rrd scripts in the path
/usr/local/zenloadbalancer/app/zenrrd
El 14/03/2013 18:31, "Justin Kuntz"
<[email protected]<mailto:[email protected]>> escribió:
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Zenloadbalancer-support mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/zenloadbalancer-support
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Zenloadbalancer-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/zenloadbalancer-support