Release 0.10.0 - Codename Nokogiri

New Publisher Interface: Prometheus

Expose napalm-logs notifications as Prometheus metrics. In order to enable this Publisher, besides listing it under the publisher configuration (or --publisher prometheus CLI), you will also need to enable the metrics by setting the enable-metrics option to true. See also: Metrics Collection.

Once the metrics and the Prometheus Publish are enabled, you’ll be able to scrape metrics such as:

# HELP napalm_logs_interface_down_total Multiprocess metric
# TYPE napalm_logs_interface_down_total counter
napalm_logs_interface_down_total{host="test-switch1",interface="FastEthernet0/2"} 1.0
napalm_logs_interface_down_total{host="NetAuto_CSRv-03",interface="GigabitEthernet2"} 2.0
napalm_logs_interface_down_total{host="router1",interface="GigabitEthernet2"} 1.0
# HELP napalm_logs_user_exit_config_mode_total Multiprocess metric
# TYPE napalm_logs_user_exit_config_mode_total counter
napalm_logs_user_exit_config_mode_total{host="test-ztp",user="admin"} 2.0
napalm_logs_user_exit_config_mode_total{host="test-ztp",user="console"} 1.0
# HELP napalm_logs_forward_traffic_total Multiprocess metric
# TYPE napalm_logs_forward_traffic_total counter
napalm_logs_forward_traffic_total{host="fw01"} 1.0
# HELP napalm_logs_local_traffic_total Multiprocess metric
# TYPE napalm_logs_local_traffic_total counter
napalm_logs_local_traffic_total{host="fw01"} 1.0
# HELP napalm_logs_user_write_config_total Multiprocess metric
# TYPE napalm_logs_user_write_config_total counter
napalm_logs_user_write_config_total{host="GeorgeSwitch",user="admin"} 1.0
# HELP napalm_logs_bfd_state_change_total Multiprocess metric
# TYPE napalm_logs_bfd_state_change_total counter
napalm_logs_bfd_state_change_total{host="HOSTNAME",interface="Ethernet50/1",session_state="DOWN"} 1.0
napalm_logs_bfd_state_change_total{host="HOSTNAME",interface="Ethernet50/1",session_state="UP"} 2.0
# HELP napalm_logs_isis_neighbor_down_total Multiprocess metric
# TYPE napalm_logs_isis_neighbor_down_total counter
napalm_logs_isis_neighbor_down_total{host="HOSTNAME",interface="et7",level="L1",neighbor="1920.0000.2006"} 1.0
# HELP napalm_logs_isis_neighbor_up_total Multiprocess metric
# TYPE napalm_logs_isis_neighbor_up_total counter
napalm_logs_isis_neighbor_up_total{host="HOSTNAME",interface="et7",level="L1",neighbor="1920.0000.2006"} 1.0
# HELP napalm_logs_user_login_total Multiprocess metric
# TYPE napalm_logs_user_login_total counter
napalm_logs_user_login_total{host="sw01.pdx01",user="luke"} 1.0
# HELP napalm_logs_interface_duplex_mode_total Multiprocess metric
# TYPE napalm_logs_interface_duplex_mode_total counter
napalm_logs_interface_duplex_mode_total{duplex_mode="FULL",host="nexus-switch",interface="Ethernet1/33"} 0.0
# HELP napalm_logs_stp_block_bpduguard_total Multiprocess metric
# TYPE napalm_logs_stp_block_bpduguard_total counter
napalm_logs_stp_block_bpduguard_total{host="switch01"} 1.0
# HELP napalm_logs_listener_logs_ingested_total Multiprocess metric
# TYPE napalm_logs_listener_logs_ingested_total counter
# HELP napalm_logs_bgp_neighbor_state_changed_total Multiprocess metric
# TYPE napalm_logs_bgp_neighbor_state_changed_total counter
napalm_logs_bgp_neighbor_state_changed_total{host="HOSTNAME",neighbor="192.0.2.2",peer_as="12345"} 2.0
napalm_logs_bgp_neighbor_state_changed_total{host="some-switch",neighbor="192.0.2.2",peer_as="12345"} 1.0
# HELP napalm_logs_bgp_prefix_limit_exceeded_total Multiprocess metric
# TYPE napalm_logs_bgp_prefix_limit_exceeded_total counter
napalm_logs_bgp_prefix_limit_exceeded_total{host="edge01",neighbor="194.53.172.97",peer_as="2611"} 1.0

For more details, see Prometheus.

Improvements

The TCP now accepts two additional parameters, framing: traditional, and frame_delimiter: \n. Using these two arguments you can optimise the communication between the syslog server and napalm-logs, by using increased sized windows and sending multiple syslog messages at once (see buffer_size: 1024).

ISO8601 date-time format is now supported by the Junos and Arista parsers.

Improved global date-time parsing: ec59dd8 and e2785c9 (obsoleted by 47605f9). With these changes, dateutil library is now a dependency.

The Alerta Publisher added in the previous release, Release 0.9.0 - Codename Hand Saw, now provides a new option, pairs.

Internal Changes and Documentation

The CI has been switched to using GitHub Actions, and this together with the new documentation for Local Testing added by @Ichabond should improve the contributing experience.