Some load-balanced applications create considerable load independent to number of connections. For example reporting a server may become overloaded if users submit a report that requires a lot of historical data to generate. If there are three servers in a farm and they each have 10 connections, one server could have people running intensive reporting, while the other is sitting idle, which is imperceptible to the ACE with out some sort of CPU inspection. This is where SNMP probes come in…
The first thing we need to do is enable SNMP services. In my case I’m using Windows Server 2008 hosts. On Unix or other OS’s your process will vary or it may already be running SNMP services.
- Open Server Manager
- Click Features
- Click Add Features on the right side
- Scroll down and check the box marked SNMP Services
- Click Next then Install
The next thing you need to do is configure it so that the ACE can talk to the host with the right strings.
- Go back to Server Manager and expand Configuration
- Click Services
- Right click on SNMP Service and click Properties
- Click the Security tab
- Uncheck Send authentication trap
- Under Accepted community names click Add...
- Leave READ ONLY
- Enter a community name appropriate for your environment (or use public) and click Add
- Under Accept SNMP packets from these hosts click Add
- Enter the IP of the ACE and click Add
- Right click the service and click Restart
Now the ACE can poll the server for SNMP entries.
The first step is configuring the rserver(s) that are going to be monitored.
rserver host SERVER1 ip address 192.168.1.1 inservice rserver host SERVER2 ip address 192.168.1.2 inservice
Now we want to build out our SNMP probe. The first step is to define it.
probe snmp CPU-PROBE
What was your community name? Enter it next.
How often do you want the ACE to check the CPU? I used 10 seconds.
If the server goes down, how many successful probes before it comes back online? Six would be 60 seconds, so I’ll use that.
passdetect count 6
The next section is tricky. How many CPU’s does your server have? You’ll have to customize your probe based on the number of CPU’s. In my case my server has two CPU’s. For one CPU the oid is .18.104.22.168.22.214.171.124.126.96.36.199 and the other is .188.8.131.52.184.108.40.206.220.127.116.11
What I’ll need to do is add both OID’s to the probe, then give them equal weight. In my example each CPU has a weight of 8000 (all your OID’s have to add up to 16000). If you had 8 CPU’s the weight would be 4000 each, and so on.
oid .18.104.22.168.22.214.171.124.126.96.36.199 weight 8000 oid .188.8.131.52.184.108.40.206.220.127.116.11 weight 8000
Now you can assign it to a serverfarm as a predictor method.
serverfarm MYFARM predictor least-loaded probe CPU-PROBE rserver SERVER1 inservice rserver SERVER2 inservice
The load is computed with the total weight of the probe, which is 16000. Run the show probe CPU-PROBE detail command to view the load on the server. Take that number and divide by 16000 to get the percentage value.
Here are some examples, the first one is for two-CPU servers and the second is for six-CPU servers.
probe snmp CPU-PROBE-TWO-CPU interval 10 passdetect interval 60 passdetect count 6 community public oid .18.104.22.168.22.214.171.124.126.96.36.199 weight 8000 oid .188.8.131.52.184.108.40.206.220.127.116.11 weight 8000
probe snmp CPU-PROBE-SIX-CPU interval 10 passdetect interval 60 passdetect count 6 community public oid .18.104.22.168.22.214.171.124.126.96.36.199 weight 2667 oid .188.8.131.52.184.108.40.206.220.127.116.11 weight 2666 oid .18.104.22.168.22.214.171.124.126.96.36.199 weight 2667 oid .188.8.131.52.184.108.40.206.220.127.116.11 weight 2667 oid .18.104.22.168.22.214.171.124.126.96.36.199 weight 2666 oid .188.8.131.52.184.108.40.206.220.127.116.11 weight 2667