12-30-2020 03:34 AM - edited 12-30-2020 03:35 AM
I need to have an output similar to the Linux ifconfig that will give me the outbound traffic in bytes and the inbound traffic in bytes . Also I would like to see it in the router logs as well so I can add data to my rsyslog program
Something similar to the Linux
RX packets 130705 bytes 22071556 (21.0 MiB)
TX packets 49312 bytes 11587251 (11.0 MiB)
Is that possible?
Solved! Go to Solution.
12-30-2020 03:38 AM
Cisco Devices always produce in bits - you can do calculation while shipping the Logs to SYSLOG Server or SYSLOG Server can run the script to convert bits to bytes.
if you want to be human readable in mbit.
show interfaces gigabitEthernet 1/1/1 human-readable
5 minute input rate 4.99 mega-bits/sec , 1.56 Kpps
5 minute output rate 1.36 mega-bits/sec , 523 pps
12-30-2020 03:58 AM
Router/ Switch syslog information related to interface can not be sent automatically to syslog server.
you need to follow one of the mechanism to ship the logs to syslog server to make your own dashboard or reports.
1. EEM Script which run on the device and keep send information to syslog server.
2. SNMP polling from syslog Server to device (this is is the best approach)
12-30-2020 03:38 AM
Cisco Devices always produce in bits - you can do calculation while shipping the Logs to SYSLOG Server or SYSLOG Server can run the script to convert bits to bytes.
if you want to be human readable in mbit.
show interfaces gigabitEthernet 1/1/1 human-readable
5 minute input rate 4.99 mega-bits/sec , 1.56 Kpps
5 minute output rate 1.36 mega-bits/sec , 523 pps
12-30-2020 03:51 AM
I see. But how can you automate the process from the router , considering that logging is happening on trigger and alerts to a rsyslog,like for exampe SSH login/Logout.
12-30-2020 03:58 AM
Router/ Switch syslog information related to interface can not be sent automatically to syslog server.
you need to follow one of the mechanism to ship the logs to syslog server to make your own dashboard or reports.
1. EEM Script which run on the device and keep send information to syslog server.
2. SNMP polling from syslog Server to device (this is is the best approach)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide