Comments (6)
Okay. I came across this "full xpath expressions do not seem to be supported #39" and understand the issue.. Let me try the workaround to use rfc-compliant netconf.
from open-nti.
Did the workaround work? could you share it with me :) ?
from open-nti.
Did someone find a solution for this? Still not working correctly. From the logs it is obvious show-interfaces-media parser is not ok...used a workaround like this for now:
parser:
regex-command: show\s+interfaces\s+media\s+ae1\s+|\s+display\s+xml
matches:
-
type: single-value
method: xpath
xpath: //*[local-name() = 'physical-interface']/traffic-statistics/input-bps
variable-name: $host.interfaces.ae1.input-bps
from open-nti.
Hi @rpetracic
The problem is the xpath expression when there are namespaces, could you please try this parser?
juniper@naraku:~/scripts/upgrade-grafana/open-nti$ cat data/junos_parsers/show-interfaces-media.parser.yaml
parser:
regex-command: show\s+interfaces\s+media\s+\|\s+display\s+xml
matches:
-
type: multi-value
method: xpath
xpath: //*[local-name() = 'physical-interface']
loop:
key: ./*[local-name() = 'name']
sub-matches:
-
xpath: ./*[local-name() = 'traffic-statistics']/*[local-name() = 'input-bps']
variable-name: $host.interface.$key.input-bps
juniper@naraku:~/scripts/upgrade-grafana/open-nti$ make cli
docker exec -i -t opennti_con /bin/bash
root@59e1645fc9a0:/# python /opt/open-nti/open-nti.py -c -s --tag test
Collector Thread-1 scheduled with following hosts: ['172.30.137.140']
Connecting to host: 172.30.137.140
[172.30.137.140]: Executing command: show version | display xml
[172.30.137.140]: Host will now be referenced as : PE1-tf-m320-1-re1
[PE1-tf-m320-1-re1]: Executing command: show interfaces media | display xml
[PE1-tf-m320-1-re1]: Parser found and processed, going to next comand.
[PE1-tf-m320-1-re1]: timestamp_tracking - CLI collection 5
Inserting into database the following datapoints:
[{'fields': {'delta_str': 'N/A', 'value_str': 'm320'},
'measurement': 'base-info',
'tags': {'device': 'PE1-tf-m320-1-re1',
'kpi': 'base-info',
'product-model': 'm320',
'version': '13.3R9-S2.1'}},
{'fields': {'delta': 0, 'value': 0},
'measurement': 'PE1-tf-m320-1-re1.interface.gr-0/0/0.input-bps',
'tags': {'device': 'PE1-tf-m320-1-re1',
'key': 'gr-0/0/0',
'kpi': 'PE1-tf-m320-1-re1.interface.gr-0/0/0.input-bps',
'product-model': 'm320',
'version': '13.3R9-S2.1'}},
{'fields': {'delta': 0, 'value': 0},
'measurement': 'PE1-tf-m320-1-re1.interface.ip-0/0/0.input-bps',
'tags': {'device': 'PE1-tf-m320-1-re1',
'key': 'ip-0/0/0',
'kpi': 'PE1-tf-m320-1-re1.interface.ip-0/0/0.input-bps',
'product-model': 'm320',
'version': '13.3R9-S2.1'}},
{'fields': {'delta': 0, 'value': 0},
.....
Regards
Efrain
from open-nti.
Thanks Efrain, this is working now. I wonder if there is an easy way to get graphs for all interfaces from one device in Grafana or they have to be added one by one.
from open-nti.
If you don't mind I open a new issue to talk about it
from open-nti.
Related Issues (20)
- fluentd/Influxdb services use jemalloc
- Use SSH Proxy for data collection
- Open-nti with Kafka
- open-nti on MAC OSX HOT 1
- How to have two sets of commands with different cron run on the same set of hosts ?
- Error during processing: undefined method `juniperNetworks' for nil:NilClass HOT 4
- chrongraf graph stops at 1 million height
- JUNOS EVO support
- missing * 8 on JTI interface traffic output stats
- "Opennti_input-oc" Missing in docker
- OpenConfig Telemetry in Grafana HOT 1
- Ubuntu 18.04 - Issues all around. Does not work out of the box anymore. Installs Way more than 3 docker containers HOT 1
- Running the start script behind a proxy
- Graphing traffic on interface by interfaces description
- No jti telemetry data in grafana
- ERROR: Service 'input-oc' failed to build
- Documentation fixes HOT 1
- qfx5100 stops sending data after upgrading from junos version 17.x to18.x and later - before it was working fine HOT 2
- InfluxDB unavailable
- Error: "Docker-Compose Make" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from open-nti.