Download PDF
Home

1. RBFS Log Files

RBFS logging infrastructure provides in-memory (BDS) and traditional (BD) logging support for RBFS applications. The BDS logging is a low latency in-memory logging which can be used in a high scale system without compromising much in performance whereas BD logging is a direct write to a file hence CPU heavy.

The BDS logging infrastructure uses the following BDS tables:

Log map

This is a statically defined table, which contains log IDs per module with required detail for each ID (such as format string, plugin, log level, log table). This table is present in all BDs.

local Log

This stores log arguments for each log ID. This is present in all BDs.

config log

Stores logging configuration. This is present in all BDs.

plug-in server

Stores plug-in server logging configuration. This is present in all BDs.

1.1. Guidelines and Limitations

  • Logging is enabled and the log-level is set to Error by default (both system and BDS logging).

  • You can enable logging via CLI, but follow the guidelines below to enable logging at high scale.

    • Logging for BDS and PUBSUB modules have been disabled by default so even if you set the global log level, you will not see any BDS and PUBSUB module logs. Since these two modules are infrastructure-specific, these logs may not be useful for end-users; however, developers can enable logging for these modules using debug commands.

  • Do not enable logging for all BDs; enable logging for the BD which is problematic

  • Do not enable BDS logging at the global level, instead enable logging for the module you want to debug

  • Do not keep the logging enabled for longer duration in a scaled setup

  • The following log levels are present in the system; anything above Warning indicates that you need to logging with caution as a scaled system might get into an unstable situation.

    • EMERGENCY

    • ALERT

    • CRITICAL

    • ERROR

    • WARNING

    • NOTICE

    • INFO

    • DEBUG

    • NONE

Note If you get into a problematic situation, logging can be disabled by deleting all the logging configuration.
  • Logging is enabled if any configuration exists in the BD start-up config files or configured via CLI.

  • To disable logging, delete all logging configurations.

  • Logging supports log file rotation.

The components of logging are:

Log Tables

Table per module and per BD

Modules

Shared library used by multiple BDs

Log Entries

Objects in log tables

Log Entry Attributes

lod_id, log_time, log_level etc.

Log Maps

Map log ID in log entry to log name and log string

Log Groups

Collection of log maps

1.2. Understanding the Log Maps

Every log map is mapped to one specific event that is logged by the application. For the optimized usage of memory, RBFS does not store the verbose strings; rather, it stores the log map as an identifier to the actual string message.

You can access these log maps by navigating into to the following location:

/usr/share/rtbrick/liblog/logs/

Here, you can see the log maps organized by the modules that they belong to.

ubuntu@bgp_rt1:/usr/share/rtbrick/liblog/logs$ ls
bds  bgp  fib  fwdinfra  ifm  lldpv2  pd  policy  pubsub  resmon  rib  snapshot  static  time-series

In the example above, you can see the modules that have registered the log maps.

If you want to understand the significance of a particular log map, you can simply grep the logmap in this directory.

By running the show log status command, you can find information about all the possible log maps and the modules in the system.

ubuntu@bgp_rt1:~$ rtb confd show log status
 Global Log Satus:
  Logging Enabled             :       true
  Logging Level               :       None
   Module Log Status:

Module [ bds ] Level Info
     Log ID Status:
       BDS_ATTRIBUTE_TEMPLATE_EVENT            , [Level] Info      , [Plugin] None      , [Render] None
 ....
 ....
 ....

Now, if you want to know what a specific log map indicates, for example, "BGP_UPD_NLRI_FAIL", you can do the following:

supervisor@dev:/usr/share/rtbrick/liblog/logs/bgp$ cat *.json | jq '.log_maps[]|select(.log_name=="BGP_UPD_NLRI_FAIL")'
{
  "log_id": 546,
  "log_name": "BGP_UPD_NLRI_FAIL",
  "log_level": "Info",
  "group_name": "message",
  "log_string": "BGP update message processing, peer %s, source %s, hostname %s, instance %s: Processing NLRI attribute failed\n",
  "args": [
    "string",
    "string",
    "string",
    "string"
  ],
  "expose": [
    "bgp_peer_ip",
    "bgp_source_ip",
    "bgp_host_name",
    "instance"
  ],
  "description": "BGP Update processing: Processing NLRI attribute failed"
}

To enable logging for above Log ID, configure log-level as Info for the module "BGP" and log-group "message"

Here, the log_string displays a human-readable interpretation of the log. The description indicates the description of the log string. The log_level indicates the log-level (Info or above) that you need to enable.

1.3. Understanding the Log Groups

A log group is a collection of log maps. This has been introduced to simplify the log configuration tasks. For example, to debug a BGP Peer issue, instead of enabling logs for individual log IDs that are related to BGP peer, you can enable log for a log group BGP Peer.

2. Configuring Logs

2.1. Logging Hierarchy

Logging can be configured at the following three hierarchies:

  • Global

  • Module

  • Log Group

The figure below shows the preference of these levels:

logging levels log group

If no configuration exists for a hierarchy, then the log-level will be inherited from the upper hierarchy. Otherwise, whatever is configured for the specific hierarchy will take priority.

2.2. Global Configuration

  • Log level – default: 'none'

Each individual hierarchy can be configured with the following log levels:

  • EMERGENCY

  • ALERT

  • CRITICAL

  • ERROR

  • WARNING

  • NOTICE

  • INFO

  • DEBUG

  • NONE

Note
  • All log levels lesser than the log level specified are logged. For example, if the specified log level is "WARNING", then all logs that come before "WARNING" (EMERGENCY, ALERT, CRITICAL, ERROR, WARNING) are logged.

  • When you set the log-level to "NONE", that means log has been disables for the specific module, group, or global.

  • Logging configuration for BDS and PUBSUB modules are not supported.

2.3. Deleting all existing log configurations

delete log

Example
root@rtbrick: cfg> delete log
root@rtbrick: cfg> commit

2.4. Configure global log level in all BD

set log <bd-name> all level <log-level>

Example
root@rtbrick: cfg> set log bd all level Warning
root@rtbrick: cfg> commit

2.4.1. Configure global log level in a single BD

set log bd <bd-name> level <log-level>

Example
root@rtbrick: cfg> set log bd pppoed.1 level Notice
root@rtbrick: cfg> commit

2.5. Configure module log level in all BD

set log <bd-name> all module <module-name> level <log-level>

Example
root@rtbrick: cfg> set log bd all module pppoed level Info
root@rtbrick: cfg> commit

2.6. Configure module log level in a single BD

set log bd <bd-name> module <module-name> level <log-level>

Example
root@rtbrick: cfg> set log bd pppoed.1 module pppoed level Warning
root@rtbrick: cfg> commit

2.7. Configure module plugin alias in all BD

set log bd all module <module-name> plugin-alias <plugin-alias>

Example
root@rtbrick: cfg> set log bd all module pppoed plugin-alias default
root@rtbrick: cfg> commit

Before configuring a plugin-alias here, you need to add graylog endpoints in the CTRLD start-up configuration. For more information, refer to the CTRLD configuration guide. If the configured plugin-alias name does not match any of the graylog endpoints name configured in CTRLD, then the log will be sent to the default graylog endpoint ("graylog_url") that is configured in CTRLD configuration.

/etc/rtbrick/ctrld/config.json example

{
"rbms_enable": true,
"rbms_host": "http://10.200.32.48",
"rbms_authorization_header": "Bearer THIS IS NOT A REAL KEY",
"rbms_heart_beat_interval": 10,
"graylog_enable": true,
"graylog_url": "http://10.200.32.49:12201/gelf",
"graylog_heart_beat_interval": 10,
"graylog_endpoints": [
{
"name": "ztp",
"url": "http://192.168.202.46:12201/gelf"
}
],
"auth_enabled": false
}

2.8. Configure module plugin alias in a single BD

set log bd <bd-name> module <module-name> plugin-alias <plugin-alias>

Example
root@rtbrick: cfg> set log bd pppoed.1 module pppoed plugin-alias pppoed
root@rtbrick: cfg> commit

2.9. Configure group log level in all BD

set log bd all module <module-name> group <group-name> level <log-level>

Example
root@rtbrick: cfg> set log bd all module pppoed group subscriber level Info
root@rtbrick: cfg> commit

2.10. Configure group log level in a single BD

set log bd <bd-name> module <module-name> group <group-name> level <log-level>

Example
root@rtbrick: cfg> set log bd pppoed.1 BD module pppoed group subscriber level Debug
root@rtbrick: cfg> commit message

2.11. Configure group plugin alias in all BD

set log bd all module <module-name> group <group-name> plugin-alias <plugin-alias>

Example
root@rtbrick: cfg> set log bd all module pppoed group subscriber plugin-alias suball
root@rtbrick: cfg> commit message

2.12. Configure group plugin alias in a single BD

set log bd <bd-name> module <module-name> group <group-name> plugin-alias <plugin-alias>

Example
root@rtbrick: cfg> set log bd pppoed.1 module pppoed group subscriber plugin-alias subp
root@rtbrick: cfg> commit

2.13. Configure group rate limit in all BD

set log bd all module <module-name> group <group-name> rate-limit <rate-limit>

Example
root@rtbrick: cfg> set log bd all module pppoed group subscriber rate-limit 100
root@rtbrick: cfg> commit
Note Rate-limiting is only supported for log groups. Configuring a higher rate-limit for a whole module may cause system instability due to generation of high volume of logs.

2.14. Configure group rate limit in a single BD

set log bd <bd-name> module <module-name> group <group-name> rate-limit 200

Example
root@rtbrick: cfg> set log bd pppoed.1 module pppoed group subscriber rate-limit 200
root@rtbrick: cfg> commit

2.15. Save configuration

save config <filename>

Example
root@rtbrick: cfg> save config log_test_config.json

2.16. Unconfiguring global log level in all BD

delete log bd all level <log-level>

Example
root@rtbrick: cfg> delete log bd all level Warning
root@rtbrick: cfg> commit

2.17. Unconfiguring global log level in a single BD

delete log bd <bd-name> level <log-level>

Example
root@rtbrick: cfg> delete log bd pppoed.1 level Notice
root@rtbrick: cfg> commit

2.18. Unconfiguring module log level in a single BD

delete log bd <bd-name> module <module-name> level <log-level>

Example
root@rtbrick: cfg> delete log bd pppoed.1 module pppoed level Warning
root@rtbrick: cfg> commit

2.19. Unconfiguring module log level in all BD

delete log bd all module <module-name> level <log-level>

Example
root@rtbrick: cfg> delete log bd all module pppoed level Info
root@rtbrick: cfg> commit

2.20. Unconfiguring module plugin alias in a single BD

delete log bd <bd-name> module <module-name> plugin-alias <plugin-alias>

Example
root@rtbrick: cfg> delete log bd pppoed.1 module pppoed plugin-alias pppoed
root@rtbrick: cfg> commit

2.21. Unconfiguring module plugin alias in all BD

delete log bd all module <module-name> plugin-alias <plugin-alias>

Example
root@rtbrick: cfg> delete log bd all module pppoed plugin-alias default
root@rtbrick: cfg> commit

2.22. Unconfiguring group log level in a single BD

delete log bd <bd-name> module <module-name> group <group-name> level <log-level>

Example
root@rtbrick: cfg> delete log bd pppoed.1 module pppoed group subscriber level Debug
root@rtbrick: cfg> commit

2.23. Unconfiguring group log level in all BD

delete log bd all module <module-name> group <group-name> level <log-level>

Example
root@rtbrick: cfg> delete log bd all module pppoed group subscriber level Info
root@rtbrick: cfg> commit

2.24. Unconfiguring group plugin alias in a single BD

delete log bd <bd-name> module <module-name> group <group-name> plugin-alias <plugin-alias>

Example
root@rtbrick: cfg> delete log bd pppoed.1 module pppoed group subscriber plugin-alias subs
root@rtbrick: cfg> commit

2.25. Unconfiguring group plugin alias in all BD

delete log bd all module <module-name> group <group-name> plugin-alias <plugin-alias>

Example
root@rtbrick: cfg> delete log bd all module pppoed group subscriber plugin-alias subs
root@rtbrick: cfg> commit

2.26. Unconfiguring group rate limit in a single BD

delete log bd <bd-name> module <module-name> group <group-name> rate-limit <rate-limit>

Example
root@rtbrick: cfg> delete log bd pppoed.1 module pppoed group subscriber rate-limit 100
root@rtbrick: cfg> commit

2.27. Unconfiguring group rate limit in all BD

delete log bd all module <module-name> group <group-name> rate-limit <rate-limit>

Example
root@rtbrick: cfg> delete log bd all module pppoed group subscriber rate-limit 100
root@rtbrick: cfg> commit

2.28. Loading configuration

load config <file-name>

Example
root@rtbrick: cfg> load config log_test_config.json

2.29. Viewing and Rendering Log Details

2.29.1. show log status

Displays the status of the log.

Example
root@rtbrick:confd> show log status
System Log Status:
  Logging Level: Emergency

Bds Log Status:
  Logging Enabled: true
  Logging Level: None

  Module Log Status:
     bds, Level: Debug, Plugin-alias: default
       Log group Status:
         generic, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         object, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         table, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         trim, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
	 l2tpd, Level: NotConfigured, Plugin-alias: None
       Log group Status:
         General, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Session, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Subscriber, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Tunnel, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
	 ngaccess_subscriberd, Level: NotConfigured, Plugin-alias: None
       Log group Status:
         BDS, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Config, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         General, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Subscriber, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         generic, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
	[ ]

2.29.2. show log status detail

root@rtbrick:confd> show log status detail
System Log Status:
  Logging Level: Emergency

Bds Log Status:
  Logging Enabled: true
  Logging Level: None

  Module Log Status:
     bds, Level: Debug, Plugin-alias: default
       Log group Status:
         generic, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Log ID Status:
           BDS_ATTRIBUTE_TEMPLATE_EVENT, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_INVALID_PARAMS, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_PUBSUB_ERROR_STATUS, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_QUEUE_TABLE, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_ROOT_EVENT, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_TEST_LOG, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         object, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Log ID Status:
           BDS_INVALID_OBJECT_TEMPLATE, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_INVALID_OBJECT_TEMPLATE_ATTRIBUTE, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_OBJECT_ATTRIBUTE_EVENT, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_OBJECT_EVENT, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_OBJECT_TEMPLATE_EVENTS, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_OBJECT_TEMPLATE_GET_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_ROOT_OBJECT_EVENT, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         table, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Log ID Status:
           BDS_TABLE_CHANGE_CALLBACK, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_TABLE_ERROR_STATUS, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_TABLE_EVENT, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_TABLE_EVENTS, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_TABLE_SEQ_BLOCK, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_TABLE_TEMPLATE_EVENT, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         trim, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Log ID Status:
           BDS_TRIM_COUNT, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_TRIM_ENTRY_ADD_FAILED, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_TRIM_INFRA_TABLE_ADD_FAILED, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_TRIM_NOT_SUPPORTED, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_TRIM_OBJECT_DELETE_FAILED, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_TRIM_SUBSCRIBED_TABLE, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           BDS_TRIM_TABLE_NOT_PRESENT, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
     l2tpd, Level: NotConfigured, Plugin-alias: None
       Log group Status:
         General, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Log ID Status:
           L2TP_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_INVALID_PACKET_RECEIVED_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Session, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Log ID Status:
           L2TP_SESSION_RCV_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Subscriber, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Log ID Status:
           L2TP_NO_POOL_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_POOL_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_RADIUS_TUNNEL_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_SESSION_CREATING_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_SESSION_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_SESSION_FSM_STATE_CHANGE_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_SESSION_REQUEST_ADD_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TUNNEL_CREDENTIAL_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Tunnel, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Log ID Status:
           L2TP_AVP_DECODE_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_AVP_ENCODE_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_DROP_PACKET_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_MBIT_UNKNOWN_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_PACKET_ENCODE_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TUNNEL_AUTH_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TUNNEL_AVP_MH_MISMATCH_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TUNNEL_DECODE_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TUNNEL_DELETED_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TUNNEL_FSM_STATE_CHANGE_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TUNNEL_MAX_RETRANSMISSION_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TUNNEL_MESSAGE_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TUNNEL_PACKET_TRY_SENDING_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TUNNEL_RECEIVE_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TUNNEL_RECEIVE_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TUNNEL_REQUEST_ADD_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TUNNEL_SEND_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TX_QUEUE_ADDED_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           L2TP_TX_QUEUE_ADD_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
      ngaccess_subscriberd, Level: NotConfigured, Plugin-alias: None
       Log group Status:
         BDS, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Log ID Status:
           SUBSMGMT_BDS_OBJECT_ADD_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_BDS_OBJECT_DEL_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_BDS_TABLE_CREATED, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_BDS_TABLE_CREATE_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_BDS_TABLE_GET_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_BDS_TEMPLATE_GET_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_BDS_TEMPLATE_POPULATE_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Config, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Log ID Status:
           SUBSMGMT_AAA_PRF_SUBSCRIBER_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_RADIUS_PRF_MISSING_IN_AAA_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_SERVICE_PROFILE_GET_FAILED_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         General, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Log ID Status:
           SUBSMGMT_LOG_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_LOG_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Subscriber, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Log ID Status:
           SUBSMGMT_QOS_EVENT_DEBUG, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_QOS_POLICER_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_QOS_SHAPER_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_SUBSCRIBER_ACCT_STOP_PROGRESS_DEBUG, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_SUBSCRIBER_ADD_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_SUBSCRIBER_DEL_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_SUBSCRIBER_IFL_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_SUBSCRIBER_LOG_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_SUBSCRIBER_LOG_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_SUBSCRIBER_LOG_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_SUBSCRIBER_NOT_FOUND_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_SUBSCRIBER_NOT_FOUND_WARNING, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         generic, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
         Log ID Status:
           SUBSMGMT_ACCT_SESSION_ID_NOT_FOUND_INFO, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10
           SUBSMGMT_TRAP_ADD_ERROR, Level: NotConfigured, Plugin-alias: None, Rate-limit: 10

2.29.3. render datastore log <table-name> to stdout <format>

supervisor@dev:~$ rtb confd render datastore log rtbrick-cli.confd.log to stdout summary
[   Info     ] <Fri Oct 16 13:35:52 GMT +0000 2020> Commit Success
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config deletion begin
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config deletion ends, status : success
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config addition begin
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config addition ends, status : success
[   Info     ] <Fri Oct 16 13:36:54 GMT +0000 2020> Commit Success
supervisor@dev:~$
supervisor@dev:~$ rtb confd render datastore log rtbrick-cli.confd.log to stdout detailed
[   Info     ] <Fri Oct 16 13:35:52 GMT +0000 2020>[rtbrick-cli]{rtbbkd_commit  : 187}-> Commit Success
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020>[rtbrick-cli]{rtbbkd_commit_bds_obj: 389}-> CLI candidate config deletion begin
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020>[rtbrick-cli]{rtbbkd_commit_bds_obj: 395}-> CLI candidate config deletion ends, status : success
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020>[rtbrick-cli]{rtbbkd_commit_bds_obj: 400}-> CLI candidate config addition begin
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020>[rtbrick-cli]{rtbbkd_commit_bds_obj: 406}-> CLI candidate config addition ends, status : success
[   Info     ] <Fri Oct 16 13:36:54 GMT +0000 2020>[rtbrick-cli]{rtbbkd_commit  : 187}-> Commit Success
supervisor@dev:~$

2.29.4. render datastore log <table-name> to file <file-name> <format>

supervisor@dev:~$ rtb confd render datastore log rtbrick-cli.confd.log to file cli_log.txt summary
supervisor@dev:~$

In this example, the log details are written to a file named "cli_log.txt" (located at /var/log/rtbrick/cli_log.txt).

The content of the file will look like this:

supervisor@dev:/var/log/rtbrick$ sudo cat cli_log.txt
[   Info     ] <Fri Oct 16 13:35:52 GMT +0000 2020>[rtbrick-cli]{rtbbkd_commit  : 187}-> Commit Success
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020>[rtbrick-cli]{rtbbkd_commit_bds_obj: 389}-> CLI candidate config deletion begin
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020>[rtbrick-cli]{rtbbkd_commit_bds_obj: 395}-> CLI candidate config deletion ends, status : success
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020>[rtbrick-cli]{rtbbkd_commit_bds_obj: 400}-> CLI candidate config addition begin
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020>[rtbrick-cli]{rtbbkd_commit_bds_obj: 406}-> CLI candidate config addition ends, status : success
[   Info     ] <Fri Oct 16 13:36:54 GMT +0000 2020>[rtbrick-cli]{rtbbkd_commit  : 187}-> Commit Success
supervisor@dev:/var/log/rtbrick$

2.29.5. Filters supported by Logging

Note All the filters explained below are also supported for rendering to files.
2.29.5.1. render datastore log <table-name> to stdout <format> filter level <log-level>

This command allows you to filter logs based on log level.

The following example shows how to filter logs for the log level "Info".

supervisor@dev:~$ rtb confd render datastore log rtbrick-cli.confd.log to stdout summary filter level Info
[   Info     ] <Fri Oct 16 13:35:52 GMT +0000 2020> Commit Success
[   Info     ] <Fri Oct 16 13:36:54 GMT +0000 2020> Commit Success
supervisor@dev:~$
2.29.5.2. render datastore log <table-name> to stdout <format> filter module <module-name>

This command allows you to filter logs based on module.

The following example shows how to filter logs for the module "rtbrick-cli".

supervisor@dev:~$ rtb confd render datastore log rtbrick-cli.confd.log to stdout summary filter module rtbrick-cli
[   Info     ] <Fri Oct 16 13:35:52 GMT +0000 2020> Commit Success
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config deletion begin
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config deletion ends, status : success
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config addition begin
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config addition ends, status : success
[   Info     ] <Fri Oct 16 13:36:54 GMT +0000 2020> Commit Success
supervisor@dev:~$
2.29.5.3. render datastore log <table-name> to stdout <format> filter module-regex <regex-string>

This command allows you to filter logs based on regular expression for module(s).

The following example shows how to filter logs for the module "rtbrick-cli*".

supervisor@dev:~$ rtb confd render datastore log rtbrick-cli.confd.log to stdout summary filter module rtbrick-cli
[   Info     ] <Fri Oct 16 13:35:52 GMT +0000 2020> Commit Success
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config deletion begin
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config deletion ends, status : success
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config addition begin
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config addition ends, status : success
[   Info     ] <Fri Oct 16 13:36:54 GMT +0000 2020> Commit Success
supervisor@dev:~$
2.29.5.4. render datastore log <table-name> to stdout <format> filter module <module-name> logmap <map-name>

This command allows you to filter logs for a log map.

The following example shows how to filter logs for the logmap "CLI_BACKEND_COMMIT_SUCCESS".

supervisor@dev:~$ rtb confd render datastore log rtbrick-cli.confd.log to stdout summary filter module rtbrick-cli logmap CLI_BACKEND_COMMIT_SUCCESS
[   Info     ] <Fri Oct 16 13:35:52 GMT +0000 2020> Commit Success
[   Info     ] <Fri Oct 16 13:36:54 GMT +0000 2020> Commit Success
supervisor@dev:~$
2.29.5.5. render datastore log <table-name> to stdout <format> filter module <module-name> logmap-regex <regex-string>

This command allows you to filter logs based on regular expression for a logmap(s).

The following example shows how to filter logs for the logmap-regex "CLI_BACKEND_*".

[ ]
supervisor@dev:~$ rtb confd render datastore log rtbrick-cli.confd.log to stdout summary filter module rtbrick-cli logmap-regex CLI_BACKEND_*
[   Info     ] <Fri Oct 16 13:35:52 GMT +0000 2020> Commit Success
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config deletion begin
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config deletion ends, status : success
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config addition begin
[   Debug    ] <Fri Oct 16 13:36:54 GMT +0000 2020> CLI candidate config addition ends, status : success
[   Info     ] <Fri Oct 16 13:36:54 GMT +0000 2020> Commit Success
supervisor@dev:~$

©Copyright 2020 RtBrick, Inc. All rights reserved. The information contained herein is subject to change without notice. The trademarks, logos and service marks ("Marks") displayed in this documentation are the property of RtBrick in the United States and other countries. Use of the Marks are subject to RtBrick’s Term of Use Policy, available at https://www.rtbrick.com/privacy. Use of marks belonging to other parties is for informational purposes only.