Need Help with cacti?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
ajeetraina
Posts: 9
Joined: Fri Jan 09, 2009 3:32 am

Need Help with cacti?

Post by ajeetraina »

We want to monitor java heap size of remote machine using cacti. Any one who have any tutorial or hint how can I do that?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

We do so in our company by using cgi-scripts on that host.
Please see 1st link of my sig to learn how to implement custom scripts with cacti
R.
ajeetraina
Posts: 9
Joined: Fri Jan 09, 2009 3:32 am

Post by ajeetraina »

Please do help me with the same.
Can you please forward the requisite script pls?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

No, I can't. They are very company-dependant.
R.
ajeetraina
Posts: 9
Joined: Fri Jan 09, 2009 3:32 am

Post by ajeetraina »

I have installed cacti on our local environemnt and configured remote host monitoring.We want to monitor java heap size of remote machine using cacti.I am able to import the tempate and made the JVM changes .But still it's not plotting the graph.
ajeetraina
Posts: 9
Joined: Fri Jan 09, 2009 3:32 am

Post by ajeetraina »

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1260368340 \
--end=1260454740 \
--title="10.236.70.50 - JVM Heap Utilization" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2009/12/09 09\:19\:00 To 2009/12/10 09\:19\:00\c" \
COMMENT:"  \n" \
--vertical-label="" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/local/apache_msa/cacti/rra/10_236_70_50_jvmmemoryheapmaxsiz_67.rrd":jvmMemoryHeapMaxSiz:AVERAGE \
DEF:b="/usr/local/apache_msa/cacti/rra/10_236_70_50_jvmmemoryheapcommit_66.rrd":jvmMemoryHeapCommit:AVERAGE \
DEF:c="/usr/local/apache_msa/cacti/rra/10_236_70_50_jvmmemoryheapused_68.rrd":jvmMemoryHeapUsed:AVERAGE \
LINE1:a#FF0000FF:"Max"  \
GPRINT:a:LAST:"      Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:b#00FF00FF:"Committed"  \
GPRINT:b:LAST:"Current\:%8.2lf %s"  \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:c#0000FFFF:"Used"  \
GPRINT:c:LAST:"     Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:c:MAX:"Maximum\:%8.2lf %s\n" 
The above is source code near the JVM Heap Cacti Graph but the graph is not displaying anything.

I did tried constructing the Memory Usage graph too and it is working.

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1260368623 \
--end=1260455023 \
--title="10.236.70.50 - Memory Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2009/12/09 09\:23\:43 To 2009/12/10 09\:23\:43\c" \
COMMENT:"  \n" \
--vertical-label="kilobytes" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/local/apache_msa/cacti/rra/10_236_70_50_mem_buffers_25.rrd":mem_buffers:AVERAGE \
DEF:b="/usr/local/apache_msa/cacti/rra/10_236_70_50_mem_swap_26.rrd":mem_swap:AVERAGE \
CDEF:cdefa=a,1024,* \
CDEF:cdefe=b,1024,* \
AREA:cdefa#FF4105FF:"Free"  \
GPRINT:cdefa:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefe#FFC73BFF:"Swap":STACK \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n" 
Pls Help me with the same.
ajeetraina
Posts: 9
Joined: Fri Jan 09, 2009 3:32 am

Post by ajeetraina »

I think no one has ever configured JVM Heap with Cacti..
thats pretty amazing !!!
If there is someone pls help me with the issue..
I know there are lots of Cacti Freaker and wont let me down.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Did you verify, that the OIDs, when polled via snmpwalk from command line, return valid data? I'm quite sure, that you will have to tell your JVM to answer SNMP requests.
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest