Created
November 30, 2012 14:21
-
-
Save hackaugusto/4176060 to your computer and use it in GitHub Desktop.
cacti - data query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| sed -e "s/\[.*\]\([^:]*\)\(.*\)/\1/" /var/log/httpd/error_log | | |
| sort | | |
| uniq -c | | |
| tr -s " " | | |
| sed 's/^[ ]//g' | | |
| cut -f 1 -d ' ' | | |
| awk '{a+=$0}END{print a}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IF-MIB::ifInOctets.1 = Counter32: 331453802 | |
| IF-MIB::ifInOctets.2 = Counter32: 5572307 | |
| IF-MIB::ifOutOctets.1 = Counter32: 4113764072 | |
| IF-MIB::ifOutOctets.2 = Counter32: 1670066329 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ifInOctets> | |
| <name>Bytes In</name> | |
| <method>walk</method> | |
| <source>value</source> | |
| <direction>output</direction> | |
| <oid>.1.3.6.1.2.1.2.2.1.10</oid> | |
| </ifInOctets> | |
| <ifOutOctets> | |
| <name>Bytes Out</name> | |
| <method>walk</method> | |
| <source>value</source> | |
| <direction>output</direction> | |
| <oid>.1.3.6.1.2.1.2.2.1.16</oid> | |
| </ifOutOctets> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extend .1.3.6.1.3.1 APACHEERR /usr/share/webapps/cacti/scripts/apacheerr.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment