Juniper Router Statistics

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
User avatar
nebj00la
Cacti User
Posts: 112
Joined: Fri Feb 17, 2006 9:02 pm
Location: Massachusetts, USA
Contact:

Juniper Router Statistics

Post by nebj00la »

Though I'd rather have these templates using an OID index, here is what I'm using in the meantime.

The templates gather CPU/Memory/Temperature statistics from the CFEB0/1, FPC0/1 and RE0/1 modules.
Attachments
cacti_graph_template_juniper_router_-_cfeb0_statistics.xml
(24.79 KiB) Downloaded 430 times
cacti_graph_template_juniper_router_-_cfeb1_statistics.xml
(24.79 KiB) Downloaded 235 times
cacti_graph_template_juniper_router_-_fpc0_statistics.xml
(24.77 KiB) Downloaded 251 times
cacti_graph_template_juniper_router_-_fpc1_statistics.xml
(24.77 KiB) Downloaded 478 times
Last edited by nebj00la on Tue May 19, 2009 2:10 pm, edited 1 time in total.
Thanks,
nebj00la
User avatar
nebj00la
Cacti User
Posts: 112
Joined: Fri Feb 17, 2006 9:02 pm
Location: Massachusetts, USA
Contact:

Post by nebj00la »

RE0/1 Statistics
Attachments
cacti_graph_template_juniper_router_-_re0_statistics.xml
(24.76 KiB) Downloaded 280 times
cacti_graph_template_juniper_router_-_re1_statistics.xml
(24.76 KiB) Downloaded 262 times
Thanks,
nebj00la
User avatar
nebj00la
Cacti User
Posts: 112
Joined: Fri Feb 17, 2006 9:02 pm
Location: Massachusetts, USA
Contact:

Post by nebj00la »

Screenshot
Attachments
JuniperRouterStats.png
JuniperRouterStats.png (18.25 KiB) Viewed 10165 times
Thanks,
nebj00la
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Consider trying to make an SNMP XML template/scripts, so it'll be more efficient / friendly for the end user. http://docs.cacti.net/howto:data_query_templates
User avatar
nebj00la
Cacti User
Posts: 112
Joined: Fri Feb 17, 2006 9:02 pm
Location: Massachusetts, USA
Contact:

Post by nebj00la »

BSOD2600 wrote:Consider trying to make an SNMP XML template/scripts, so it'll be more efficient / friendly for the end user. http://docs.cacti.net/howto:data_query_templates
I've been struggling with another template which follows that method, and can't get it to work. See http://bugs.cacti.net/view.php?id=1466

I was afraid that if I tried the same method with this template, I would have no useful output as a result. I needed something in the meantime, so I created the non-indexed templates. I will try to create this template indexed, now that I have something. I'll use this thread to post results and questions.
Thanks,
nebj00la
User avatar
nebj00la
Cacti User
Posts: 112
Joined: Fri Feb 17, 2006 9:02 pm
Location: Massachusetts, USA
Contact:

Post by nebj00la »

BSOD2600 wrote:Consider trying to make an SNMP XML template/scripts, so it'll be more efficient / friendly for the end user. http://docs.cacti.net/howto:data_query_templates
I've attached what I believe is a start. I still don't have a full understanding of how to convert the input/output data into templates.
Attachments
1.3.6.1.4.1.2636.3.1.13.txt
SNMP Walk of Index
(46.96 KiB) Downloaded 472 times
JuniperRouterStats.xml
XML Query
(2.25 KiB) Downloaded 287 times
Thanks,
nebj00la
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I would create separate xml scripts for each environment probe type you're going to monitor: For example:

Code: Select all

<interface>
        <name>Get Juniper Router Power Statistics</name>
        <oid_index>.1.3.6.1.4.1.2636.3.1.13.1.5</oid_index>
        <oid_index_parse>OID/REGEXP:.*\2.([0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2})$</oid_index_parse> 
        <index_order_type>numeric</index_order_type>
        <index_title_format>|chosen_order_field|</index_title_format>
        <fields>
	          <Index>
                        <name>Index</name>
                        <source>index</source>
                        <direction>input</direction>
		    </Index>
                <jnxOperatingDescr>
                        <name>Operating Description</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2636.3.1.13.1.5</oid>
                </jnxOperatingDescr>
                <jnxOperatingState>
                        <name>Operating State</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2636.3.1.13.1.6</oid>
                </jnxOperatingState>
                <jnxOperatingTemp>
                        <name>Operating Temperature</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.2636.3.1.13.1.7</oid>
                </jnxOperatingTemp>
                <jnxOperatingCPU>
                        <name>Operating CPU</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.2636.3.1.13.1.8</oid>
                </jnxOperatingCPU>
                <jnxOperatingBuffer>
                        <name>Operating Buffer</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.2636.3.1.13.1.11</oid>
                </jnxOperatingBuffer>		
        </fields>
</interface>
The idea is that we're splitting off the last 3 OIDs fields to create the index. Also if you use the Threshold plugin, it would be useful to expose the Operating State as an output field -- you can have them both as in input and output, just the XML field name has to be different.
mihho66
Posts: 6
Joined: Thu Jul 03, 2008 12:25 am

Post by mihho66 »

It show the "Error: XML: Hash version does not exist" message, when I imported the graph_template.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

mihho66 wrote:It show the "Error: XML: Hash version does not exist" message, when I imported the graph_template.
Your cacti version is too old to use the template. http://docs.cacti.net/howto:determine_c ... te_version
mihho66
Posts: 6
Joined: Thu Jul 03, 2008 12:25 am

Post by mihho66 »

The following is my host information, it's a new cacti version.
How can i resolve this problem?
thanks
Cacti Version - 0.8.7c
Plugin Architecture - 2.2
Poller Type - Cactid v
Server Info - Linux 2.6.9-78.0.13.ELsmp
Web Server - Apache/2.0.63 (CentOS)
PHP - 5.1.6
PHP Extensions - libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, standard, SimpleXML, sockets, SPL, shmop, session, Reflection, pspell, posix, mime_magic, iconv, hash, gmp, gettext, ftp, exif, date, curl, ctype, calendar, bz2, zlib, pcre, openssl, apache2handler, gd, ldap, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, snmp, eAccelerator
MySQL - 5.0.68
RRDTool - 1.2.23
SNMP - 5.1.2
Plugins
  • Global Plugin Settings (settings - v0.5)
    Device Monitoring (monitor - v0.8.2)
    Network Discovery (discovery - v0.8.5)
    Network Tools (tools - v0.3)
    Login Page Mod (loginmod - v1.0)
    Host Info (hostinfo - v0.2)
    Error Images (errorimage - v0.1)
    docs
    Cacti-ReportIt (reportit - v0.6.1)
    Router Configs (routerconfigs - v0.1)
[/quote]
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

mihho66 wrote:The following is my host information, it's a new cacti version.
How can i resolve this problem?
thanks
Cacti Version - 0.8.7c
Wrong.

The hash for the [first] template in this thread is: 0018, which is Cacti 0.8.7d. You are running Cacti 0.8.7c. Once again, your version is too old. Upgrade. The latest is 0.8.7e.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests