Skip to content
This repository was archived by the owner on Oct 11, 2020. It is now read-only.

Troubleshooting guide

Khelil Sator edited this page Mar 22, 2019 · 8 revisions

Docker

Run this command to list Docker images

$ docker image

Run this command to list running containers

$ docker ps

Run this command to list all containers

$ docker ps -a

Run this command to list containers

$ docker-compose ps

Run this command to list networks

$ docker network ls

SNMP

test SNMP from Ubuntu

$ sudo apt install snmp

Verify

$ snmpwalk --version
$ snmpwalk --help

Run this snmpwalk command to use the community public, snmp version 2c, ip 100.123.1.0, oid .1.3.6.1.2.1.2.2

$ snmpwalk -v 2c -c public 100.123.1.0 .1.3.6.1.2.1.2.2

test SNMP from Junos

Run these commands to test oids on Junos devices:

jcluser@vMX-addr-4> show snmp mib walk .1.3.6.1.2.1.15.3.1.7
bgpPeerRemoteAddr.192.168.1.2 = 192.168.1.2
bgpPeerRemoteAddr.192.168.2.2 = 192.168.2.2
bgpPeerRemoteAddr.192.168.3.2 = 192.168.3.2
jcluser@vMX-addr-4> show snmp mib walk .1.3.6.1.2.1.15.3.1.2
bgpPeerState.192.168.1.2 = 6
bgpPeerState.192.168.2.2 = 6
bgpPeerState.192.168.3.2 = 6
jcluser@vMX-addr-4> show snmp mib get bgpPeerState.192.168.1.2
bgpPeerState.192.168.1.2 = 6

telegraf

Openconfig telegraf container

for troubleshooting purposes you can run this command

$ docker logs telegraf-openconfig

start a shell session in the telegraf container

$ docker exec -it telegraf-openconfig bash

Run this command to print the telegraf version

# telegraf --version

verify the telegraf configuration file

# more /etc/telegraf/telegraf.conf

exit the telegraf container

# exit

SNMP telegraf container

for troubleshooting purposes you can run this command

$ docker logs telegraf-snmp

start a shell session in the telegraf container

$ docker exec -it telegraf-snmp bash

Run this command to print the telegraf version

# telegraf --version

verify the telegraf configuration file

# more /etc/telegraf/telegraf.conf

The MIB are in the directory /usr/share/snmp/mibs. Run this command to verify:

# ls /usr/share/snmp/mibs

exit the telegraf container

# exit

Grafana

for troubleshooting purposes you can run this command

$ docker logs grafana

Request tracker

for troubleshooting purposes you can run this command

$ docker logs request tracker

Verify you can use rt Python library from saltstack master

  • Run this command to start a shell session on the saltstack master container
docker exec -it master bash
  • on the saltstack master container, start a Python interactive session
# python
Python 2.7.12 (default, Dec  4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import rt
>>> tracker = rt.Rt('http://100.123.35.1:9080/REST/1.0/', 'root', 'password')
>>> tracker.url
'http://100.123.35.1:9080/REST/1.0/'
>>> tracker.login()
True
>>> tracker.search(Queue='General', Status='new')
[]
>>> tracker.create_ticket(Queue='General', Subject='abc', Text='bla bla bla')
1
>>> tracker.reply(1, text='notes you want to add to the ticket 1')
True
>>> tracker.search(Queue='General')
[{u'Status': u'open', u'Priority': u'3', u'Resolved': u'Not set', u'TimeLeft': u'0', u'Creator': u'root', u'Started': u'Wed Jul 11 09:30:57 2018', u'Starts': u'Not set', u'Created': u'Wed Jul 11 09:30:10 2018', u'Due': u'Not set', u'LastUpdated': u'Wed Jul 11 09:30:57 2018', u'FinalPriority': u'0', u'Queue': u'General', 'Requestors': [u''], u'Owner': u'Nobody', u'Told': u'Not set', u'TimeEstimated': u'0', u'InitialPriority': u'0', u'id': u'ticket/1', u'TimeWorked': u'0', u'Subject': u'abc'}]
>>> for item in  tracker.search(Queue='General'):
...    print item['id']
...
ticket/1
>>> tracker.logout()
True
>>> exit()

Use RT GUI to verify the ticket details you created previously with Python interactive session

Junos

connections

Run this command to show system connections activity

jcluser@vMX-addr-4> show system connections

sensors

Run this command to check the sensors on Junos

jcluser@vMX-addr-4> show agent sensors

packages

The Junos packages openconfig and na telemetry are required for Openconfig telemetry.
Starting with Junos OS Release 18.3R1, the Junos OS image includes them, therefore, you do not need anymore to install them separately on your device.
If your devices are running an older Junos release, you need to install them separately.

Run this command to validate your Junos devices are using these 2 packages:

jcluser@vMX-addr-4> show version | match "Junos:|openconfig|na telemetry"

configuration

Run these commands to verify your Junos devices are running an appropriate configuration for snmp and openconfig telemetry

jcluser@vMX-1> show configuration snmp | display set
jcluser@vMX-1> show configuration system services extension-service | display set
jcluser@vMX-1> show configuration system services netconf | display set

YANG

Run this command to show YANG packages installed on Junos:

jcluser@vMX-1> show system yang package

Run this command to list YANG modules available on Junos:

jcluser@vMX-1> file list /opt/yang-pkg/junos-openconfig/yang/

Run this command to know which reference of a YANG module is used on a Junos device.
Example with openconfig-bgp-neighbor.yang YANG module

jcluser@vMX-1> file more /opt/yang-pkg/junos-openconfig/yang/openconfig-bgp-neighbor.yang

Run this command to understand which YANG deviations are used on a Junos device:

jcluser@vMX-1> file more /opt/yang-pkg/junos-openconfig/yang/jnx-openconfig-dev.yang

SaltStack

Run this command to check the salt-master service status

docker exec -it master service salt-master status

Run this command to check the salt-minion service status

docker exec -it minion1 service salt-minion status

Run this command to list the keys accepted by the master

docker exec -it master salt-key -L

Run this command to validate minion configuration

docker exec -it minion1 more /etc/salt/minion

Run this command to validate master configuration

docker exec -it master more /etc/salt/master

Run this command to validate proxy configuration

docker exec -it minion1 more /etc/salt/proxy

Run these commands to validate master <-> minion communication

docker exec -it master salt minion1 test.ping
docker exec -it master salt "minion1" cmd.run "more /etc/salt/minion"

Run these commands to validate master <-> proxies <-> junos devices communication

docker exec -it master salt 'vMX*' junos.cli 'show chassis hardware'

to watch the event bus, start a shell session on the master and run this command:

docker exec -it master bash
salt-run state.event pretty=True
Clone this wiki locally