SRX Services Gateway
Highlighted
SRX Services Gateway

Attached: SRX Cacti host template

[ Edited ]
‎05-21-2010 08:19 PM

Here's a Cacti host template that I put together, tested on SRX100, started with a smaller template for an EX series so it should be generic enough to work on most models. It includes CPU, memory, flow session count, storage used, and system temperature. The only thing I'm not sure of is the storage layout being the same across devices, there weren't labels for the SNMP indexes, so you may have to change the last digit on the OIDs for the various data templates. Other than that, have fun, and please, if you add to it post it back.

Note that I changed the extension to .txt to satisfy the forum's attachment requirements.

 

Thanks to someITguy for pointing out that some of the OIDs were missing '.' prefixes. Apparently cacti was tolerant of this in many cases, but it was obviously a mistake and didn't work for his installation.

Attachments

36 REPLIES 36
Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎05-22-2010 09:14 AM

thanks for this! Please reply to this so I can credit you a 'solved' thread.

 

-Keith

Highlighted
SRX Services Gateway
Solution
Accepted by Automate (Trusted Expert)
‎08-26-2015 01:27 AM

Re: Attached: SRX Cacti host template

‎05-22-2010 01:28 PM

No problem, just hope people will find it useful.

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎05-24-2010 02:42 AM

I was just last week testing cacti and wondering if there were any SRX plugins... This seems to work with SRX650 just fine, many thanks!

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎05-24-2010 08:47 AM

Hi there,

 

Thanks for the template, but when I try importing your template into Cacti I get this error message - Error: XML: hash version does not exist.

 

I am using Cacti Version 0.8.7b

 

Any help would be highly appriciated.

 

Thanks

 

 

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎05-24-2010 09:50 AM

take a look at this:

 

http://docs.cacti.net/howto:determine_cacti_template_version

 

basically you'll have to be running 0.8.7e or newer.  Sorry, you may have to upgrade!  

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎05-24-2010 11:49 AM

Thanks for letting me know I will try that.

 

Cheers

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎05-30-2010 11:33 PM

 


@obi-lan wrote:

I was just last week testing cacti and wondering if there were any SRX plugins... This seems to work with SRX650 just fine, many thanks!


 

Hi obi-lan,

with oure SRX650 the CPU and Memory Chart wont work. With OID do you use for the two values in the SRX?

 

With the SRX100 the template works fine! Many thanks for that!

 

Best Regards

Jochen

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎05-31-2010 10:04 AM

I can't help you with 650 specifics, but I can perhaps give you the oids to help you find it.  Do you have the mibs installed? If so, walk JUNIPER-MIB::jnxOperatingTable and see if any of them fit.

snmpwalk -v2c -c @readonly 10.10.1.1 JUNIPER-MIB::jnxOperatingTable

 

If not, that corresponds to oid .1.3.6.1.4.1.2636.3.1.13, but you may have trouble deciphering what's what. Here's what I get for descriptions and corresponding CPU util:

 

 

SNMPv2-SMI::enterprises.2636.3.1.13.1.5.1.1.0.0 = STRING: "midplane"
SNMPv2-SMI::enterprises.2636.3.1.13.1.5.2.1.0.0 = STRING: "PEM 0"
SNMPv2-SMI::enterprises.2636.3.1.13.1.5.7.1.0.0 = STRING: "FPC: FPC @ 0/*/*"
SNMPv2-SMI::enterprises.2636.3.1.13.1.5.8.1.1.0 = STRING: "PIC: 8x FE Base PIC @ 0/0/*"
SNMPv2-SMI::enterprises.2636.3.1.13.1.5.9.1.0.0 = STRING: "Routing Engine"
SNMPv2-SMI::enterprises.2636.3.1.13.1.5.9.1.1.0 = STRING: "USB Hub"
SNMPv2-SMI::enterprises.2636.3.1.13.1.8.1.1.0.0 = Gauge32: 0
SNMPv2-SMI::enterprises.2636.3.1.13.1.8.2.1.0.0 = Gauge32: 0
SNMPv2-SMI::enterprises.2636.3.1.13.1.8.7.1.0.0 = Gauge32: 0
SNMPv2-SMI::enterprises.2636.3.1.13.1.8.8.1.1.0 = Gauge32: 0
SNMPv2-SMI::enterprises.2636.3.1.13.1.8.9.1.0.0 = Gauge32: 20
SNMPv2-SMI::enterprises.2636.3.1.13.1.8.9.1.1.0 = Gauge32: 0

If you're not familiar with the way it indexes, it does so off of the last four digits, so '9100' refers to my routing engine, and then each OID ending in 9100 is a stat of that routing engine. So maybe your routing engine just has a different index.  Memory is the same:

 

SNMPv2-SMI::enterprises.2636.3.1.13.1.11.9.1.0.0 = Gauge32: 60

and temperature:

SNMPv2-SMI::enterprises.2636.3.1.13.1.7.9.1.0.0 = Gauge32: 49

I'd recommend installing or at least reading the mib files because they'll give you info on what the values mean, what units they're in, etc.

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

[ Edited ]
‎05-31-2010 11:05 PM

Thanks for your reply sor.

 

I know all that information about OIDs and I already have the MIB Tables.

There I found no way to monitor the CPU for the SRX650.

I ask the support and the told me, that the SRX650 still not support monitor the CPU via SNMP.

 

So I will wait to the next JUNOS versions and hope, that this "feature" will come soon 😉

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎06-03-2010 05:11 AM

Smarthouse_JB:

 

I use the template without modification and did work straight. I think the OID is .1.3.6.1.4.1.2636.3.1.13.1.8.9.1.0.0 for CPU. Same worked on SRX240 too. Software version on  SRX650 is 10.1R1.8

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎06-04-2010 12:43 AM

Hej obi-lan

Ok, i use the version 10.0.R2.10 on the SRX650 Cluster.

On this version the OID .1.3.6.1.4.1.2636.3.1.13.1.8.9.1.0.0 doesen't exist.

 

On the other platforms it works with this version pretty good.

 

Cheers Jochen

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎06-07-2010 10:51 PM

There's a known issue with SRX clusters in current code where jnxOperatingTable and, more specifically, the jnxBoxAnatomy parent aren't populated.  I've had a case open on this for a while and the issue has been acknowledged and sent to engineering though I'm still waiting on an official PR.

-Chris
Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎06-08-2010 01:50 PM

None of the template values seem to be working for me.. Normal SNMP data such as the interfaces seem to be fine and I don't seem to be getting errors..

 

Is there any specific configuration needed? SNMP version? or any host specific stuff?

 

Right now I simply have a an SNMP allow for the Cacti host and SNMP v2 set in cacti.

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

[ Edited ]
‎06-08-2010 03:05 PM

To clarify, what do you mean by 'template isn't working, normal SNMP data works', the cacti template works for you but only on interfaces, not on the indexed items (disk space)? Or it works when you manually add the host but the template doesn't work?

Sounds as though you're asking about setting up SNMP perms, so you probably aren't even sure if you can get SNMP data back yet?

I'll ask, are you able to snmpwalk the SRX from your cacti host? If so, then you probably need to tweak some of the OIDs in the template. Use snmpwalk and the MIBs from the juniper website to determine what you're after.  If not, then you probably need to focus on proving that the SRX is accepting/returning queries, even independent of cacti.

 

The template is really just a grouping of prelabeled OIDs to query and graph definitions, so it should be transparent of anything else, so long as you can 1) import the template into cacti, and 2) query the SRX from the cacti host via SNMP and return the OID data.

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

[ Edited ]
‎06-08-2010 03:32 PM

I know how templates work, what I am saying is that none of the special data-sources from this template graph on the SRX 210 I am testing against runing JunOS 10.1R1.8.

 

I haven't had a chance to rip apart the template and walk the devices.

 

What does work is the generic interface data-sources. IE graphing bandwidth on ge-0/0/1 works just fine so I know SNMP is working.

 

What I was asking before diging deeper was if a specific SNMP version was needed to be set in Cacti (currently set to SNMP v2) or if any special settings where needed on the SRX to export of graph these extra data points.

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

[ Edited ]
‎06-08-2010 03:46 PM

To answer that question, no. Templates in general are transparent to the SNMP configuration of a device, whether you choose v2 or v3 auth, encryption type, etc , so long as cacti can pull data with the credentials it's given.

 

If you can get the interfaces through the generic templates, then it's strange that the interface templates in this host template don't work, because they should be the exact same data template. I just included the standard interface data template, into the host template, and the graph template for that was only slightly modified.  If it weren't for that, I would suspect that you were only exporting specific OIDs to the community you're querying.

 

You shouldn't have to rip apart the template to walk the device. See the OID posted earlier, just walk that and it should return the juniper chassis specific stuff. That will at least show you if it's capable of retrieving CPU/mem/temp.

 

Ah, something else to check is to look and see if the data is making it to the RRD. Or better yet, just look at the graph and enable debug, see if the RRDs/data are there.  I've seen issues with cacti in the past where I've had to manually adjust the data sources being polled for a particular graph, even though all the data was there (mainly multicore cpu stuff).

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎06-08-2010 03:57 PM

 


@sor wrote:

  If it weren't for that, I would suspect that you were only exporting specific OIDs to the community you're querying.

 


 

Ok, then maybe my SNMP setting on the SRX is wrong, this is what I have where x values have been blocked out for privacy.

 

 

snmp {
    community xxxxxxxxxx {
        authorization read-only;
        clients {
            10.x.x.x/32;
        }
    }
    health-monitor;
}

 

 

Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎06-08-2010 05:09 PM
I have also walked the srx from my cacti box and although a lot is returned I do not get anything for the OID in the template
Highlighted
SRX Services Gateway

Re: Attached: SRX Cacti host template

‎06-08-2010 05:19 PM

Ok, so you have health-monitor on. What do you get when you type 'show snmp health-monitor' on the cli?  For me, this shows the OIDs that are in the template... translated per the MIB definitions, i.e. the '9.1.0.0' cpu, etc.

 

root@cerberus> show snmp health-monitor    

Alarm 
Index  Variable description                           Value State

 32768 Health Monitor: root file system utilization
       jnxHrStoragePercentUsed.1                         64 active              

 32769 Health Monitor: /config file system utilization
       jnxHrStoragePercentUsed.2                          0 active              

 32770 Health Monitor: RE 0 CPU utilization
       jnxOperatingCPU.9.1.0.0                           93 rising threshold    

 32771 Health Monitor: RE 1 CPU utilization
       jnxOperatingCPU.9.2.0.0                            0 object not available

 32772 Health Monitor: RE 0 memory utilization
       jnxOperatingBuffer.9.1.0.0                        61 active              

 32773 Health Monitor: RE 1 memory utilization
       jnxOperatingBuffer.9.2.0.0                         0 object not available

 32774 Health Monitor: Max Kernel Memory Used (%) 
       jnxBoxKernelMemoryUsedPercent.0                    1 active              
Feedback