cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
1473
Views
0
Helpful
3
Replies
oslopez
Beginner

Reading a syslog file using pyATS

Hi, I'm learning to use pyATS to read logs from a cisco syslog file and I have the following issue:

I took a syslog fole called cisco.log which contains logs from an ARS1001 router and a Nexus 9K switch. Logs have the following format:

 

 

2021-07-12T12:12:03.781015-04:00 10.4.8.1 HOSTNAME.LOC: 2021 Jul 12 16:12:03 UTC: %ETHPORT-5-IF_DOWN_LINK_FAILURE: Interface Ethernet1/8 is down (Link failure)

 

 

After running the command:

$ pyats logs view /var/log/cisco.log

 

I see the following messages in the terminal:

Logfile: /home/administrator/Downloads/cisco.log

View at: 
    http://localhost:38799/

Press Ctrl-C to exit

--------------------------------------------------------------------------------

[19086:19132:0716/104215.466643:ERROR:component_installer.cc(339)] Failed to read manifest or verify installation for OnDeviceHeadSuggest (/home/administrator/.config/google-chrome/OnDeviceHeadSuggestModel/20210705.383967546).: Success (0)
[19086:19132:0716/104215.466705:ERROR:component_installer.cc(339)] Failed to read manifest or verify installation for OnDeviceHeadSuggest (/home/administrator/.config/google-chrome/OnDeviceHeadSuggestModel/20210613.379707716).: Success (0)
[19126:19126:0716/104215.648861:ERROR:viz_main_impl.cc(160)] Exiting GPU process due to errors during initialization
[19225:19225:0716/104215.719071:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[19166:8:0716/104215.757385:ERROR:command_buffer_proxy_impl.cc(123)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.

The browser kicks in but only shows an empty box:

Capture.JPG

 

At this point I wonder if the format of the cisco.log file is correct.

Any clue would be appreciated.

 

1 ACCEPTED SOLUTION

Accepted Solutions
fracjackmac
Beginner

Hello @oslopez,

 

pyats logs view is intended to view logs of previous or current runs with pyATS.  In other words, it'll read and host the logs from a pyats "job".

 

It is NOT intended to read syslog files.

 

Please see the documentation here: https://pubhub.devnetcloud.com/media/pyats/docs/cli/pyats_logs.html

View solution in original post

3 REPLIES 3
fracjackmac
Beginner

Hello @oslopez,

 

pyats logs view is intended to view logs of previous or current runs with pyATS.  In other words, it'll read and host the logs from a pyats "job".

 

It is NOT intended to read syslog files.

 

Please see the documentation here: https://pubhub.devnetcloud.com/media/pyats/docs/cli/pyats_logs.html

oslopez
Beginner

Thanks @fracjackmac,

 

Looks like I misunderstood the use of this tool, I'm still in the learning curve. Thanks again.

You're welcome @oslopez 

 

Good luck in your pursuit of automation knowledge!

Create
Recognize Your Peers
Content for Community-Ad