Script for Cisco Switch/Router CPU Utilization
Moderators: Developers, Moderators
Script for Cisco Switch/Router CPU Utilization
Running RH7.3 Cacti,
Anyone have a script that can pull CPU Usage, Memory, etc type stats from a cisco router/switch - other then just port usage stats ?
Thank you
Joseph
cne5@excite.com
Anyone have a script that can pull CPU Usage, Memory, etc type stats from a cisco router/switch - other then just port usage stats ?
Thank you
Joseph
cne5@excite.com
CPU for a Cisco
Depending on the Cisco you have, the OID will be different.
For a CISCO 2600 and 3600 to get the CPU:
You can use OID: .1.3.6.1.4.1.9.2.1.58.0
In cacti you can use the script that came with it "Get SNMP Data" so you will not need to creat e a new script.
If you have more OID, will be great if you share them with us in this forums.
For a CISCO 2600 and 3600 to get the CPU:
You can use OID: .1.3.6.1.4.1.9.2.1.58.0
In cacti you can use the script that came with it "Get SNMP Data" so you will not need to creat e a new script.
If you have more OID, will be great if you share them with us in this forums.
You can find some interesting OIDs (not only cisco) here:
http://www.ansdell.demon.co.uk/networks/monitor.html
- bulek
http://www.ansdell.demon.co.uk/networks/monitor.html
- bulek
I am sorry to bother - but I am new to scripts/cdef/snmp/oid etc, how do I start ?
> For a CISCO 2600 and 3600 to get the CPU: <--yes I have
> You can use OID: .1.3.6.1.4.1.9.2.1.58.0 <-- ok wut I do ?
>In cacti you can use the script that came with it "Get SNMP Data" so you >will not need to creat e a new script. <-- dont understand
**is there a step by step on how to do this to get this into a graph ? Please anyone
> For a CISCO 2600 and 3600 to get the CPU: <--yes I have
> You can use OID: .1.3.6.1.4.1.9.2.1.58.0 <-- ok wut I do ?
>In cacti you can use the script that came with it "Get SNMP Data" so you >will not need to creat e a new script. <-- dont understand
**is there a step by step on how to do this to get this into a graph ? Please anyone
Here is how to do it:
1.- Go to "Data Gathering" and select "Data Sources"
2.- Press the "Add" option.
3.- In the "Name:" field put "router1_cpu"
4.- In the "Data Source Type:" field select "GAUGE"
5.- In the "Data Input Type:" field select "Get SNMP Data"
6.- In the "Associated RRA's:" field select all.
7.- In the "Heartbeat:" field put "600"
8.- In the "Step:" field put "300"
9.- In the "Minumum Value:" field put "0"
10.- In the "Maximum Value:" field put "100"
11.- Make "Update .rrd File" checkbox Checked
12.- Make "Active" checkbox Checked
13.- Then Press Save.
14.- In the list of DS select "Edit Data" in the "Get SNMP Data" that is in the right of the "router1_cpu" you already created.
15.- Fill there the IP and the SNMP community.
This will start to get the data every 5 minutes.
The next step it to build the graph.
Hope this help you.
2.- Press the "Add" option.
3.- In the "Name:" field put "router1_cpu"
4.- In the "Data Source Type:" field select "GAUGE"
5.- In the "Data Input Type:" field select "Get SNMP Data"
6.- In the "Associated RRA's:" field select all.
7.- In the "Heartbeat:" field put "600"
8.- In the "Step:" field put "300"
9.- In the "Minumum Value:" field put "0"
10.- In the "Maximum Value:" field put "100"
11.- Make "Update .rrd File" checkbox Checked
12.- Make "Active" checkbox Checked
13.- Then Press Save.
14.- In the list of DS select "Edit Data" in the "Get SNMP Data" that is in the right of the "router1_cpu" you already created.
15.- Fill there the IP and the SNMP community.
This will start to get the data every 5 minutes.
The next step it to build the graph.
Hope this help you.
Thank you, I did create a graph but there is no data appearing in the graph.
-------------------------------- this is the code in router1_cpu ------------
/usr/bin/rrdtool create \
/var/www/html/cacti-0.6.8a/rra/router1_cpu.rrd \
--step 300 \
DS:router1_cpu:GAUGE:600:0:100 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
I also used the OID of "1.3.6.1.4.1.9.2.1.57" do I need the prepending . ? -or is there anyway to check the rrd to make sure it is collecting data ?
-------------------------------- this is the code in router1_cpu ------------
/usr/bin/rrdtool create \
/var/www/html/cacti-0.6.8a/rra/router1_cpu.rrd \
--step 300 \
DS:router1_cpu:GAUGE:600:0:100 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
I also used the OID of "1.3.6.1.4.1.9.2.1.57" do I need the prepending . ? -or is there anyway to check the rrd to make sure it is collecting data ?
:|
Minor user error on this one.....
I was able to get it to graph, just needed to create the (area).
Another Quick Question:
Is there someway to get protocol data to a graph ie: http/ftp/smtp etc
Sources for MIB/OID info:
http://www.cisco.com/cgi-bin/Support/Mi ... r/unity.pl <--req.login
http://www.mibdepot.com/
http://www.alvestrand.no/objectid/top.html
http://jaguar.ir.miami.edu/~marcus/snmptrans_help.html <--very usefull
Minor user error on this one.....
I was able to get it to graph, just needed to create the (area).
Another Quick Question:
Is there someway to get protocol data to a graph ie: http/ftp/smtp etc
Sources for MIB/OID info:
http://www.cisco.com/cgi-bin/Support/Mi ... r/unity.pl <--req.login
http://www.mibdepot.com/
http://www.alvestrand.no/objectid/top.html
http://jaguar.ir.miami.edu/~marcus/snmptrans_help.html <--very usefull
cisco OID/MIB ?
How do you pull stats CPU/MEM/TEMP from a Cisco 6509 Switch ? can I get netflow data from this or ipaccounting data ? do I need an OID if so what would it be for this data ?
Thanks
Thanks
Who is online
Users browsing this forum: No registered users and 0 guests