Logging Operational Commands
The logging operational commands provide information about the logging operations. They are used to show logs in the system, log configuration status and so on.
BDS Logging
The BDS logging show commands provide information about the BDS logging operations. With the BDS logging operational commands, you can verify BDS logging configuration status and view BDS logs.
Verifying BDS Logging Configuration Status
Show Log Status
This command shows log configuration status for all modules except infrastructure modules in all BDs. The default show log status displays the summary of log status for the whole system and there are options available to show specific module or BD log status.
Syntax:
| Option | Description |
|---|---|
|
Without any option, the command displays the log configuration status for all modules except infrastructure modules in all BDs. |
|
Displays log status of the all modules including infrastructure in the specified BD. |
|
Displays the log configuration status in detail all the way till log IDs. |
|
Displays the log status for a given module in all BDs where this module is running. |
Example 1: Summary of log status
supervisor@rtbrick: cfg> show log status
Module log status:
bds_mock:
confd:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
generic error None none 10
bgp:
confd:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
config error None none 10
general error None none 10
generic error None none 10
instance error None none 10
interface warning None none 10
message error None none 10
peer error None none 10
bgp.appd.1:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
config error None none 10
general error None none 10
generic error None none 10
instance error None none 10
interface warning None none 10
message error None none 10
peer error None none 10
bgp.iod.1:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
config error None none 10
general error None none 10
generic error None none 10
instance error None none 10
interface warning None none 10
message error None none 10
peer error None none 10
fib:
confd:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
adjacency error None none 10
bds error None none 10
config error None none 10
general error None none 10
generic error None none 10
instance-afi-safi error None none 10
interface-events error None none 10
route error None none 10
fwdinfra:
ribd:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
generic error None none 10
confd:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
generic error None none 10
staticd:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
generic error None none 10
ifmd:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
generic error None none 10
mribd:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
generic error None none 10
hostconfd:
confd:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
bds error None none 10
config error None none 10
functional error None none 10
generic error None none 10
ifm:
confd:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
bds error None none 10
config error None none 10
general error None none 10
generic error None none 10
interface-events error None none 10
ifmd:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
bds error None none 10
config error None none 10
general error None none 10
generic error None none 10
interface-events error None none 10
igmp:
pim.appd.1:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
config error None none 10
generic error None none 10
igmp-interface-events error None none 10
igmp-membership-events error None none 10
igmp-packet-events error None none 10
igmp-route-events error None none 10
confd:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
config error None none 10
generic error None none 10
igmp-interface-events error None none 10
igmp-membership-events error None none 10
igmp-packet-events error None none 10
igmp-route-events error None none 10
igmp.appd.1:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
config error None none 10
generic error None none 10
igmp-interface-events error None none 10
igmp-membership-events error None none 10
igmp-packet-events error None none 10
igmp-route-events error None none 10
pim.iod.1:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
config error None none 10
generic error None none 10
igmp-interface-events error None none 10
Example 2: View of module log status
supervisor@rtbrick: cfg> show log status module bgp
Module log status:
bgp:
confd:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
config error None none 10
general error None none 10
generic error None none 10
instance error None none 10
interface warning None none 10
message error None none 10
peer error None none 10
bgp.appd.1:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
config error None none 10
general error None none 10
generic error None none 10
instance error None none 10
interface warning None none 10
message error None none 10
peer error None none 10
bgp.iod.1:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
config error None none 10
general error None none 10
generic error None none 10
instance error None none 10
interface warning None none 10
message error None none 10
peer error None none 10
Example 3: Log status of the all modules including infrastructure in the specified BD.
supervisor@rtbrick: cfg> show log status bd bgp.appd.1
System/File log status:
Level: error
Module log status:
bd:
Level: none, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Level Rate limit
generic none None none 10
http none None none 10
bds:
Level: none, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Level Rate limit
generic none None none 10
object none None none 10
table none None none 10
trim none None none 10
bgp:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Level Rate limit
config error None none 10
general error None none 10
generic error None none 10
instance error None none 10
interface warning None none 10
message error None none 10
peer error None none 10
license:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Level Rate limit
generic error None none 10
internal error None none 10
operational error None none 10
policy:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Level Rate limit
BDS error None none 10
Configuration error None none 10
Enforcement error None none 10
Generation error None none 10
generic error None none 10
poold:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Level Rate limit
generic error None none 10
pubsub:
Level: none, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Level Rate limit
generic none None none 10
secure_management:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Level Rate limit
generic error None none 10
snapshot:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Level Rate limit
generic error None none 10
time_series:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Level Rate limit
generic error None none 10
Example 4: Log status for given module in the given BD
supervisor@rtbrick: cfg> show log status module bgp bd bgp.appd.1
Module log status:
bgp:
bgp.appd.1:
Level: error, Plugin: None, Plugin Level: none
Log group status:
Group Level Plugin Plugin Level Rate limit
config error None none 10
general error None none 10
generic error None none 10
instance error None none 10
interface warning None none 10
message error None none 10
peer error None none 10
Example 5: Log status for active logs per log ID
supervisor@rtbrick: cfg> show log status bd bgp.appd.1 detail
System/File log status:
Level: error
Module log status:
bd:
Level: none, Plugin: None, Plugin Level: none
Log group status:
generic, Level: none, Plugin: None, Plugin Level: none, Rate limit: 10
http, Level: none, Plugin: None, Plugin Level: none, Rate limit: 10
Log ID status:
LOG ID Level Plugin Level Rate limit
HTTP_JWK_FILE_JSON_PARSE_FAILED none None none 10
HTTP_JWK_FILE_MEM_ALLOC_FAILED none None none 10
HTTP_JWK_FILE_MISSING none None none 10
HTTP_JWK_FILE_OPEN_FAILED none None none 10
HTTP_JWK_FILE_READ_FAILED none None none 10
HTTP_JWK_MISSING_KEY none None none 10
HTTP_JWK_MULTIPLE_KEYS none None none 10
HTTP_SEND none None none 10
HTTP_WRITE_BUFFER_MEM_ALLOC_FAILED none None none 10
HTTP_WRITE_PRINTF_FAILED none None none 10
bds:
Level: none, Plugin: None, Plugin Level: none
Log group status:
generic, Level: none, Plugin: None, Plugin Level: none, Rate limit: 10
Log ID status:
LOG ID Level Plugin Level Rate limit
BDS_ATTRIBUTE_TEMPLATE_EVENT none None none 10
BDS_INVALID_PARAMS none None none 10
BDS_PUBSUB_ERROR_STATUS none None none 10
BDS_QUEUE_TABLE none None none 10
BDS_ROOT_EVENT none None none 10
BDS_TEST_LOG none None none 10
object, Level: none, Plugin: None, Plugin Level: none, Rate limit: 10
Log ID status:
LOG ID Level Plugin Level Rate limit
Viewing BDS Logs
Show Log
This command shows BDS logs in the log tables. By default, the command show log shows all logs present in the log tables. Various command options are available to filter and display logs. Also, a command option is available to send logs into a file.
Syntax:
| Option | Description |
|---|---|
|
Without any option, the command displays all logs present in the log tables. |
|
Render output of the log can be filtered for the specified module or the log level. You can specify filter level or module with any of the |
|
Choose any of the three formats: abstract, summary, or detailed. This command provides output in the specified output format. You can specify any of the options at end of any of the |
|
Displays logs from a specified log table. Every BD includes multiple log tables. By default, log will be rendered from every log table, if not specified. |
|
Name of the file in which logs are transported. You can specify |
Example 1: View of logs
supervisor@rtbrick: op> show log [ Error ] <2021-07-09T04:35:53.184694+0000> Table [global.hostconfd.table.config] - event Failed to open file [ Error ] <2021-07-09T04:35:53.184771+0000> Table [global.hostconfd.table.config] - event Could not create snapshot block [ Error ] <2021-07-09T04:35:53.184849+0000> Table [global.hostconfd.table.config] - event Failed to open file [ Error ] <2021-07-09T04:35:53.184866+0000> Table [global.hostconfd.table.config] - event Could not create snapshot block [ Error ] <2021-07-09T04:35:53.201029+0000> Table [global.time-series.config] - event Failed to open file [ Error ] <2021-07-09T04:35:53.201052+0000> Table [global.time-series.config] - event Could not create snapshot block [ Error ] <2021-07-09T04:35:53.201106+0000> Table [global.time-series.config] - event Failed to open file [ Error ] <2021-07-09T04:35:53.201125+0000> Table [global.time-series.config] - event Could not create snapshot block [ Error ] <2021-07-09T04:35:53.222660+0000> Table [secure.global.system.table.config] - event Failed to open file [ Error ] <2021-07-09T04:35:53.222679+0000> Table [secure.global.system.table.config] - event Could not create snapshot block [ Error ] <2021-07-09T04:36:00.720574+0000> Table [global.tacacs.config] Object [name - tacacs_config_object] attribute - tacacs_server_ip not found event TACACS Server Hostconfd Config
Example 2: Summary view for the show log table
supervisor@rtbrick: op> show log table secure_management.confd.log [ Error ] <Tue Nov 10 19:44:48 GMT +0000 2020> Table [global.tacacs.config] Object [name - tacacs_config_object] attribute - tacacs_server_ip not found event TACACS Server Hostconfd Config
Example 3: View of applied filters on all logs from a single table
supervisor@: op> show log table rtbrick-cli.confd.log filter level Info [ Info ] <Thu Nov 12 11:20:29 GMT +0000 2020> Commit Success [ Info ] <Thu Nov 12 11:21:08 GMT +0000 2020> Advertise:true | Snapshot type:2 | Table name:global.system.confrtbrickig.table | Table type:system_config_table | Deferred:false | Interval:0 | Type:0 | Consume:false [ Info ] <Thu Nov 12 11:21:08 GMT +0000 2020> No keys to inherit, yang node identifier: table-type system_config_table, table-getter symbol name : confd_system_config_tbl_tmpl_get , libname : libconfd.so [ Info ] <Thu Nov 12 11:21:08 GMT +0000 2020> Advertise:true | Snapshot type:2 | Table name:global.rtbrick.hostname.config | Table type:global_rtbrick_hostname_tbl | Deferred:false | Interval:0 | Type:0 | Consume:false [ Info ] <Thu Nov 12 11:21:08 GMT +0000 2020> No keys to inherit, yang node identifier: table-type global_rtbrick_hostname_tbl, table-getter symbol name : confd_rtbrick_hostname_config_tbl_tmpl_get , libname : libconfd.so [ Info ] <Thu Nov 12 11:21:08 GMT +0000 2020> Commit Success
Example 4: Show Log to File
supervisor@rtbrick: op> show log to file test.log
supervisor@rtbrick: op> exit
supervisor@rtbrick:~ $ cat test.log
[ info ] <2022-05-10T11:53:15.399613+0000> Global config for Instance(default) is added
[ info ] <2022-05-10T11:53:15.400666+0000> Global address family(ipv4, unicast) is added in Instance(default)
[ info ] <2022-05-10T11:53:15.400711+0000> Global address family(ipv4, multicast) is added in Instance(default)
[ info ] <2022-05-10T11:53:15.400729+0000> Global address family(ipv4, labeled-unicast) is added in Instance(default)
[ info ] <2022-05-10T11:53:15.400744+0000> Global address family(ipv6, unicast) is added in Instance(default)
[ info ] <2022-05-10T11:53:15.400758+0000> Global address family(ipv6, multicast) is added in Instance(default)
[ info ] <2022-05-10T11:53:15.400773+0000> Global address family(ipv6, labeled-unicast) is added in Instance(default)
[ info ] <2022-05-10T11:53:15.400787+0000> Global address family(mpls, unicast) is added in Instance(default)
[ info ] <2022-05-10T11:53:07.757687+0000> User 'supervisor' executed command 'show log'
[ info ] <2022-05-10T11:53:10.751083+0000> User 'supervisor' executed command 'show log'
[ info ] <2022-05-10T11:53:15.338391+0000> Failed due to bds events- {table:global_ntp_config_tbl}
[ info ] <2022-05-10T11:53:15.338442+0000> Failed due to bds events- {table:ipmi_user_config_table}
[ info ] <2022-05-10T11:53:15.338469+0000> Failed due to bds events- {table:lum_config_table}
[ info ] <2022-05-10T11:53:15.338491+0000> Failed due to bds events- {table:ipmi_interface_config_table}
[ info ] <2022-05-10T11:53:15.338509+0000> Failed due to bds events- {table:authorization_config_table}
[ info ] <2022-05-10T11:53:07.644676+0000> Commit Success
[ info ] <2022-05-10T11:53:15.337573+0000> Table - global_tacacs_config_tbl object not found event secure_hostconfd_write_config
[ info ] <2022-05-10T11:53:15.337602+0000> Table [global.tacacs.config] Object [name - tacacs_config_object] attribute - tacacs_server_ip not found event TACACS Server Hostconfd Config
[ info ] <2022-05-10T11:53:15.337241+0000> No objects present in alert configuration table to send to hostconfd
Example 5: Logs for filter level
supervisor@rtbrick: op> show log filter level Error [ Error ] <Tue Nov 10 19:44:31 GMT +0000 2020> Table [/var/rtbrick/commit_registry/global.commit.registry.snap] - event Could not open file for reading [ Error ] <Tue Nov 10 19:44:48 GMT +0000 2020> Table [global.tacacs.config] Object [name - tacacs_config_object] attribute - tacacs_server_ip not found event TACACS Server Hostconfd Config
Example 6: Logs for specified module
supervisor@rtbrick: op> show log filter module secure_management [ Error ] <Tue Nov 10 19:44:48 GMT +0000 2020> Table [global.tacacs.config] Object [name - tacacs_config_object] attribute - tacacs_server_ip not found event TACACS Server Hostconfd Config supervisor@leaf: op>
Example 7: View of the logs in abstract format
supervisor@rtbrick: op> show log format abstract Table [/var/rtbrick/commit_registry/global.commit.registry.snap] - event Could not open file for reading Commit Success CLI candidate config deletion begin CLI candidate config deletion ends, status : success CLI candidate config addition begin Advertise:true | Snapshot type:2 | Table name:global.system.config.table | Table type:system_config_table | Deferred:false | Interval:0 | Type:0 | Consume:false No keys to inherit, yang node identifier: table-type system_config_table, table-getter symbol name : confd_system_config_tbl_tmpl_get , libname : libconfd.so Setting attribute > Table name : global.system.config.table, object : system_config_object, command-token-name : name, attribute-name : configuration_name, value : rtbrick, type : string BDS object found Processing TARGET transaction and replaying ADD, xml_name : system Setting attribute > Table name : global.system.config.table, object : system_config_object, command-token-name : name, attribute-name : configuration_name, value : rtbrick, type : string Table name global.system.config.table, object name system_config_object Table name global.system.config.table, object name system_config_object, status success Advertise:true | Snapshot type:2 | Table name:global.rtbrick.hostname.config | Table type:global_rtbrick_hostname_tbl | Deferred:false | Interval:0 | Type:0 | Consume:false No keys to inherit, yang node identifier: table-type global_rtbrick_hostname_tbl, table-getter symbol name : confd_rtbrick_hostname_config_tbl_tmpl_get , libname : libconfd.so
Viewing ONL Log Files
ONL log files are available at the following directory:
CtrlD log files are available at:
/var/log/rtbrick-ctrld.log`
Example: CtrlD Logs
supervisor@onl>ufi06.q2c.u25.r4.nbg.rtbrick.net:/var/log $ tail -10 rtbrick-ctrld.log 2022-05-04 08:31:24 UTC INF HTTP request completed host=198.51.100.29:19091 method=GET path=/api/v1/rbfs/elements/ufi06.q2c.u25.r4.nbg.rtbrick.net/services/prometheus/proxy/federate remote_addr=198.51.100.49:41508 request_id=R4n9-tadb statuscode=200 user_name= user_subject= 2022-05-04 08:31:24 UTC INF HTTP request completed host=198.51.100.29:19091 method=GET path=/api/v1/ctrld/info remote_addr=198.51.100.121:34158 request_id=yFn9Ptadb statuscode=200 user_name= user_subject= 2022-05-04 08:31:24 UTC INF HTTP request completed host=198.51.100.31:19091 method=GET path=/api/v1/ctrld/system/clock remote_addr=198.51.100.10:57824 request_id=_cno-gadu statuscode=200 user_name= user_subject= 2022-05-04 08:31:25 UTC INF HTTP request completed host=198.51.100.29:19091 method=GET path=/api/v1/rbfs/elements/rtbrick/services/PROMETHEUS/proxy/federate remote_addr=198.51.100.229:39654 request_id=DXSoPgaHu statuscode=404 user_name= user_subject= 2022-05-04 08:31:29 UTC INF HTTP request completed host=198.51.100.29:19091 method=GET path=/api/v1/rbfs/elements/ufi06.q2c.u25.r4.nbg.rtbrick.net/services/prometheus/proxy/federate remote_addr=198.51.100.49:41508 request_id=iQqo-gaHu statuscode=200 user_name= user_subject= 2022-05-04 08:31:34 UTC INF HTTP request completed host=198.51.100.29:19091 method=GET path=/api/v1/rbfs/elements/ufi06.q2c.u25.r4.nbg.rtbrick.net/services/prometheus/proxy/federate remote_addr=198.51.100.49:41508 request_id=LWM9PgrHb statuscode=200 user_name= user_subject=
ApiGwD log files are available at:
/var/log/rtbrick-apigwd.log
Example: API Gateway Logs
supervisor@onl>ufi06.q2c.u25.r4.nbg.rtbrick.net:/var/log $ cat rtbrick-apigwd.log
Tue May 3 23:27:12 UTC 2022 Starting rtbrick apigwd service
Version: v0.10.0-internal.20220222110916+Bdevelopment.C2a896336 (built with go1.17.7)
2022-05-03 23:27:12 UTC INF development/apigwd/pkg/options/options.go:158 > watching for file change /etc/rtbrick/apigwd/config.json
2022-05-03 23:27:12 UTC INF development/apigwd/cmd/apigwd/server.go:29 > listening on listen_addr=:12321
2022-05-03 23:27:12 UTC INF development/apigwd/cmd/apigwd/server.go:89 > certman: certificate and key loaded
2022-05-03 23:27:12 UTC INF development/apigwd/cmd/apigwd/server.go:89 > certman: watching for cert and key change
2022-05-03 23:28:15 UTC INF development/apigwd/pkg/options/options.go:165 > watch event: {/etc/rtbrick/apigwd/config.json 2}
2022-05-03 23:28:15 UTC INF development/apigwd/pkg/options/options.go:165 > watch event: {/etc/rtbrick/apigwd/config.json 2}
2022-05-03 23:28:15 UTC INF development/apigwd/cmd/apigwd/routes.go:62 > reloaded request limiter config
2022-05-03 23:28:15 UTC INF development/apigwd/cmd/apigwd/routes.go:62 > reloaded request limiter config
Viewing Logs in Graylog
For viewing your log data on Graylog, perform the following steps:
-
Open the Graylog webpage.
-
Log in using your user credentials.
-
Click System and select Input.
-
Click the Show received message tab.
The log messages page appears.