Hey All,
I'm new to cacti and scripting.. and working on new requirement for ironport monitoring .. Here is the requirements...
1. Get X1 using Snmpget (cpucachetime)
2. wait for n seconds
3. Get X2 using Snmpget (cpucachetime) -- the OID is same as step 1....
4. printout of value of (X2-X1) / n *100 - This value would be actual performance in percentage.
I'm not sure how to implement this in Cacti. Any suggestions would be very helpful.
Thank you
Sridhar
Custom script for Ironport
Moderators: Developers, Moderators
Re: Custom script for Ironport
Probably no script is needed in this case.
Try:
1) Create new CDEF (e.g. "Multiply by 100")
2) Duplicate "SNMP - Generic OID Template" (or "Cisco Router - 5 Minute CPU") data template, then configure it
- Choose "GAUGE" as Data Source Type
- Set your OID
3) Create new graph template (or duplicate "Cisco - CPU Usage")
- Choose the above datasource (= step 2) for each graph items
- Select the above CDEF (= step 1) as CDEF Function
4) Add the above graph template to your device, then create graph
See also:
- Walkthrough: My First Data Template
- Walkthrough: My First Graph Template
Try:
1) Create new CDEF (e.g. "Multiply by 100")
Code: Select all
cdef=CURRENT_DATA_SOURCE,100,*
- Choose "GAUGE" as Data Source Type
- Set your OID
3) Create new graph template (or duplicate "Cisco - CPU Usage")
- Choose the above datasource (= step 2) for each graph items
- Select the above CDEF (= step 1) as CDEF Function
4) Add the above graph template to your device, then create graph
See also:
- Walkthrough: My First Data Template
- Walkthrough: My First Graph Template
Re: Custom script for Ironport
Hi,
thank you. However, in CDEF how do i get the value of the old data source. In my case, the goal is to find the difference between current data source and another datasource 5 mins before.
I checked special data source and I'm not sure how to get value of old datasource..
I tried this CDEF:
CURRENT_DATA_SOURCE,PREV,-,300,/,100,*
As my polling interval is 5 mins... i thought might work..any suggestions would be helpful.
-Sridhar
thank you. However, in CDEF how do i get the value of the old data source. In my case, the goal is to find the difference between current data source and another datasource 5 mins before.
I checked special data source and I'm not sure how to get value of old datasource..
I tried this CDEF:
CURRENT_DATA_SOURCE,PREV,-,300,/,100,*
As my polling interval is 5 mins... i thought might work..any suggestions would be helpful.
-Sridhar
Re: Custom script for Ironport
Oops, then try "COUNTER" (for cumulative value) or "DERIVE" (for up/down counter, see RRDtool manual) as data source type at the above step 2).sridharp wrote: thank you. However, in CDEF how do i get the value of the old data source. In my case, the goal is to find the difference between current data source and another datasource 5 mins before.
Calculating differences from previous data will be done by Cacti (RRDtool).
Re: Custom script for Ironport
Thanks a lot. That helped....
I set COUNTER in Data template used CDEF to get it in percentage....
-Sridhar
I set COUNTER in Data template used CDEF to get it in percentage....
-Sridhar
Who is online
Users browsing this forum: No registered users and 7 guests