Syslog information
Import OPBNOS API
from opbclient import opb_api as opbapi
Initialize client
Use the appropriate JSON file that corresponds to the targetted device name. This JSON file should contain request body parameters corresponding to any potential configuration/post requests.
node = opbapi.connect_to('SN2010')
Get/Show Syslog Information
Retrieves syslogs from the system
node.execute(['show syslog information'])
Output
This is an example of the output of the above command:
b'{"1":{"time":"Oct 5 06:22:26.453866","severity":"INFO","component":"syncd#/broadcom_nagg_asic.py","msg":"[nagr]:Stat Poll-Table Handler Key map6 Data{'clear-all': 'false'}"}'
The below table lists possible outputs:
Attribute | Values | Description |
---|---|---|
"time" | "Month Date time" | timestamp |
"severity" | int/"INFO" | event severity rating |
"component" | "" | syslog messege components |
"msg" | "" | syslog messege |