Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 5
Next »
https://github.com/Juniper/healthbot-rules/
https://github.com/ksator/junos_monitoring_with_healthbot
| rpc commands |
---|
show | looking for the rate on an interface
jcluser@vMX-addr-5> show interfaces ge-0/0/3.0 detail | match bps
Input bytes : 503550 3912 bps
Output bytes : 523272 4144 bps
|
rpc command |
jcluser@vMX-addr-5> show interfaces ge-0/0/3.0 detail | display xml rpc
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/18.3R1/junos">
<rpc>
<get-interface-information>
<detail/>
<interface-name>ge-0/0/3.0</interface-name>
</get-interface-information>
</rpc>
<cli>
<banner></banner>
</cli>
</rpc-reply>
|
show in xml format | <logical-interface> <transit-traffic-statistics>
<input-bps> 1128 </input-bps>
<output-bps> 1128 </output-bps>
jcluser@vMX-addr-5> show interfaces ge-0/0/3.0 detail | display xml
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/18.3R1/junos">
<interface-information xmlns="http://xml.juniper.net/junos/18.3R1/junos-interface" junos:style="normal">
<logical-interface>
<name>ge-0/0/3.0</name>
<local-index>335</local-index>
<snmp-index>537</snmp-index>
<generation>144</generation>
<if-config-flags>
<iff-up/>
<iff-snmp-traps/>
<internal-flags>0x4004000</internal-flags>
</if-config-flags>
<encapsulation>ENET2</encapsulation>
<policer-overhead>
</policer-overhead>
<traffic-statistics junos:style="verbose" junos:indent="2" >
<input-bytes>890256</input-bytes>
<output-bytes>1040970</output-bytes>
<input-packets>11762</input-packets>
<output-packets>12249</output-packets>
</traffic-statistics>
<local-traffic-statistics>
<input-bytes>270795</input-bytes>
<output-bytes>399696</output-bytes>
<input-packets>3830</input-packets>
<output-packets>4094</output-packets>
</local-traffic-statistics>
<transit-traffic-statistics>
<input-bytes>619461</input-bytes>
<input-bps>1128</input-bps>
<output-bytes>641274</output-bytes>
<output-bps>1128</output-bps>
<input-packets>7932</input-packets>
<input-pps>2</input-pps>
<output-packets>8155</output-packets>
<output-pps>1</output-pps>
</transit-traffic-statistics>
<filter-information>
</filter-information>
<address-family>
<address-family-name>inet</address-family-name>
<mtu>1500</mtu>
<max-local-cache>75000</max-local-cache>
<new-hold-limit>75000</new-hold-limit>
<intf-curr-cnt>1</intf-curr-cnt>
<intf-unresolved-cnt>0</intf-unresolved-cnt>
<intf-dropcnt>0</intf-dropcnt>
<generation>170</generation>
<route-table>0</route-table>
<address-family-flags>
<ifff-sendbcast-pkt-to-re/>
<internal-flags>0x0</internal-flags>
</address-family-flags>
<filter-information>
</filter-information>
<policer-information>
</policer-information>
<interface-address>
<ifa-flags>
<ifaf-current-preferred/>
<ifaf-current-primary/>
</ifa-flags>
<ifa-destination>7.105.106.0/30</ifa-destination>
<ifa-local>7.105.106.1</ifa-local>
<ifa-broadcast>7.105.106.3</ifa-broadcast>
<generation>146</generation>
</interface-address>
</address-family>
<address-family>
<address-family-name>iso</address-family-name>
<mtu>1497</mtu>
<generation>171</generation>
<route-table>0</route-table>
<address-family-flags>
<internal-flags>0x0</internal-flags>
</address-family-flags>
</address-family>
<address-family>
<address-family-name>mpls</address-family-name>
<mtu>1488</mtu>
<maximum-labels>3</maximum-labels>
<generation>172</generation>
<route-table>0</route-table>
<address-family-flags>
<internal-flags>0x10000000</internal-flags>
</address-family-flags>
</address-family>
<address-family>
<address-family-name>multiservice</address-family-name>
<mtu>Unlimited</mtu>
<generation>173</generation>
<route-table>0</route-table>
<address-family-flags>
<internal-flags>0x0</internal-flags>
</address-family-flags>
<filter-information>
</filter-information>
<policer-information>
<policer-input>__default_arp_policer__</policer-input>
</policer-information>
</address-family>
</logical-interface>
</interface-information>
<cli>
<banner></banner>
</cli>
</rpc-reply>
jcluser@vMX-addr-5>
|
rpc test on the junos router | jcluser@vMX-addr-5> netconf <rpc><get-pfe-statistics/> <rpc><close-session/>
jcluser@ubuntu:/var/local/healthbot/input$ more traffic-statistics.yml
---
SystemStatisticsTable:
rpc: get-pfe-statistics
item: pfe-traffic-statistics
key: pfe-input-packets
view: PFEStatisticsView <<<<<<<<<<<<< Next line
PFEStatisticsView:
fields:
pfe-input-packets: pfe-input-packets
pfe-output-packets: pfe-output-packets
jcluser@vMX-addr-5> show pfe statistics traffic | display xml rpc
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/18.3R1/junos">
<rpc>
<get-pfe-statistics> <<<<<<<<<<<<<<<<<<<< RPC commands: rpc: get-pfe-statistics
</get-pfe-statistics>
</rpc>
jcluser@vMX-addr-5> netconf
<!-- No zombies were killed during the creation of this user interface -->
<!-- user jcluser, class j-super-user -->
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
<capability>urn:ietf:params:netconf:capability:candidate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:confirmed-commit:1.0</capability>
<capability>urn:ietf:params:netconf:capability:validate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file</capability>
<capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:candidate:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:validate:1.0</capability>
<capability>urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring</capability>
<capability>http://xml.juniper.net/netconf/junos/1.0</capability>
<capability>http://xml.juniper.net/dmi/system/1.0</capability>
</capabilities>
<session-id>8927</session-id>
</hello>
]]>]]>
<rpc><get-pfe-statistics/>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.3R1/junos">
<pfe-statistics>
<pfe-traffic-statistics> <<<<<<<<<<<<<<<<<<<<< Start here: item: pfe-traffic-statistics and key: pfe-input-packets
<pfe-input-packets>67819</pfe-input-packets> <<<<<<<<< Value of interest : pfe-input-packets: pfe-input-packets
<input-pps>4</input-pps>
<pfe-output-packets>69769</pfe-output-packets> <<<<<<<<< value of interest: pfe-output-packets: pfe-output-packets
<output-pps>4</output-pps>
<pfe-fabric-input>0</pfe-fabric-input>
<pfe-fabric-input-pps>0</pfe-fabric-input-pps>
<pfe-fabric-output>0</pfe-fabric-output>
<pfe-fabric-output-pps>0</pfe-fabric-output-pps>
</pfe-traffic-statistics> <<<<<<<<<<<<<<<<<<<<< Finish here:
<pfe-local-traffic-statistics>
<pfe-input-packets>33262</pfe-input-packets>
<pfe-output-packets>70654</pfe-output-packets>
<software-input-control-drops>0</software-input-control-drops>
<software-input-high-drops>0</software-input-high-drops>
<software-input-medium-drops>0</software-input-medium-drops>
<software-input-low-drops>0</software-input-low-drops>
<software-output-low-drops>0</software-output-low-drops>
<hardware-input-drops>0</hardware-input-drops>
</pfe-local-traffic-statistics>
<pfe-local-protocol-statistics>
<hdlc-keepalive-count>0</hdlc-keepalive-count>
<atm-oam-count>0</atm-oam-count>
<fr-lmi-count>0</fr-lmi-count>
<ppp-lcp-ncp-count>0</ppp-lcp-ncp-count>
<ospf-hello-count>0</ospf-hello-count>
<ospf3-hello-count>0</ospf3-hello-count>
<rsvp-hello-count>12642</rsvp-hello-count>
<ldp-hello-count>0</ldp-hello-count>
<bfd-count>0</bfd-count>
<isis-iih-count>7395</isis-iih-count>
<lacp-count>0</lacp-count>
<arp-count>85</arp-count>
<ether-oam-count>0</ether-oam-count>
<unknown-count>0</unknown-count>
</pfe-local-protocol-statistics>
<pfe-hardware-discard-statistics>
<timeout-discard>0</timeout-discard>
<truncated-key-discard>0</truncated-key-discard>
<bits-to-test-discard>0</bits-to-test-discard>
<data-error-discard>0</data-error-discard>
<tcp-header-error-discard>0</tcp-header-error-discard>
<stack-underflow-discard>0</stack-underflow-discard>
<stack-overflow-discard>0</stack-overflow-discard>
<bad-route-discard>111</bad-route-discard>
<nexthop-discard>0</nexthop-discard>
<invalid-iif-discard>0</invalid-iif-discard>
<info-cell-discard>0</info-cell-discard>
<fabric-discard>0</fabric-discard>
</pfe-hardware-discard-statistics>
<pfe-chip-statistics>
<input-checksum>0</input-checksum>
<output-mtu>0</output-mtu>
</pfe-chip-statistics>
</pfe-statistics>
<rpc/>
<rpc-error>
<error-type>protocol</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-message>syntax error, expecting </rpc></error-message>
<error-info>
<bad-element>rpc</bad-element>
</error-info>
</rpc-error>
<rpc><close-session/>
|
|
|
|
|
|
|
|
|
|
|