Skip to main content
12 events
when toggle format what by license comment
Jan 6, 2012 at 8:21 comment added APZ CMDPHP: Poller[0] Host[0] DS[36] CMD: /home/ubuntu/cacti/incomingRequests.sh, output: Requests:9559 01/05/2012 09:28:19 PM - WEBLOG: Poller[0] CACTI2RRD: /usr/bin/rrdtool graph - --imgformat=PNG --start=-33053184 --end=-86400 --title='Traffic SiteName' --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 --units-exponent='0' --vertical-label='Incoming Requests' --slope-mode --font TITLE:12: --font AXIS:8: --font LEGEND:10: --font UNIT:8: DEF:a="/var/lib/cacti/rra/fe_requests_36.rrd":FE_Requests:AVERAGE LINE2:a#0000FFFF:"" GPRINT:a:LAST:"Current%8.2lf %s"
Jan 6, 2012 at 8:16 comment added APZ thanks for this info but because of time constraint and my familiarity with SSH concept I have decided to go with script/command method for now. Things seem to be working fine partially, problem is that debug logs show that output is getting generated via the bash script but graphis not being plotted, am pasting lines from log file for convenience, I know I have been bugging you but this by far has been the hardest tool for me to configure, please help as am running short on time for this project. I am putting logs in next comment.
Jan 4, 2012 at 12:38 comment added growse You should be able to just create a graph for your host, and in graph templates select "Generic SNMP OID". In the next screens, you should be able to add the OID and other things like colour, max value, data type etc. and it should just graph it.
Jan 4, 2012 at 2:42 comment added APZ SNMPwalk now gives the correct output: UCD-SNMP-MIB::extOutput.1 = STRING: 384213, thanks for your patience, now from this point onwards can you throw some light on how to get a graph from this. I guess I need to replace the script/command with SNMP in the data input method. Can you please guide me a little more.
Jan 3, 2012 at 19:48 comment added growse You could try granting the user snmpd is running as to have read access to haproxy.log.....?
Jan 3, 2012 at 19:14 comment added APZ Yes exactly, whats the way around for this then?
Jan 3, 2012 at 19:08 comment added growse Sounds like the user snmpd is running as doesn't have permission to read haproxy.log.
Jan 3, 2012 at 18:44 comment added APZ from the command line, shtest gives the right output:25061(number of lines in haproxy.log file) but when I use snmpwalk snmpwalk -v 1 -c aaaa 1.2.2.5 .1.1.1.1.1.1.2223.1 I get permission denied UCD-SNMP-MIB::extIndex.1 = INTEGER: 1 UCD-SNMP-MIB::extNames.1 = STRING: shelltest UCD-SNMP-MIB::extCommand.1 = STRING: /bin/bash UCD-SNMP-MIB::extResult.1 = INTEGER: 0 UCD-SNMP-MIB::extOutput.1 = STRING: cat: /var/log/haproxy.log: Permission denied UCD-SNMP-MIB::extErrFix.1 = INTEGER: noError(0) UCD-SNMP-MIB::extErrFixCmd.1 = STRING:
Jan 2, 2012 at 10:45 comment added growse That snmp output says that you just ran bash, and it exited code 0. Why are you trying to run sh shelltest /bin/bash /tmp/shtest? Why not just have exec [oid] shelltest /tmp/shtest directly? What happens if you run shtest from the command line? Also, don't put scripts like this in /tmp - There's no guarantee that they'll get left alone by the kernel. Put them in /usr/local/bin/ or similar instead.
Jan 2, 2012 at 2:23 comment added APZ Continuation of the last comment, I used snmp walk command and got this output both on local machine and from cacti server.
Jan 2, 2012 at 2:12 comment added APZ I tried what u mentioned, added sh shelltest /bin/bash /tmp/shtest to conf file but the output am getting is not correct. UCD-SNMP-MIB::extIndex.1 = INTEGER: 1 UCD-SNMP-MIB::extCommand.1 =STRING: /bin/bash UCD-SNMP-MIB::extResult.1 = INTEGER: 0 UCD-SNMP-MIB::extOutput.1 = STRING: 0 UCD-SNMP-MIB::extErrFix.1 = INTEGER: noError(0) UCD-SNMP-MIB::extErrFixCmd.1 = STRING: Please help me in getting just the lines in haproxy log file getting displayed, script is owned by ubuntu. Please help.
Dec 30, 2011 at 15:47 history answered growse CC BY-SA 3.0