Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add metrics for MAC address table #156

Merged
merged 2 commits into from
Oct 19, 2021

Conversation

kakkotetsu
Copy link
Contributor

This PR adds prometheus metrics for MAC address table entries.

The following metrics are now exposed.

# HELP junos_mac_table_dynamic_count Number of dynamic entries in table
# TYPE junos_mac_table_dynamic_count gauge
junos_mac_table_dynamic_count{target="ex3200-1"} 23
# HELP junos_mac_table_flood_count Number of flood entries in table
# TYPE junos_mac_table_flood_count gauge
junos_mac_table_flood_count{target="ex3200-1"} 2
# HELP junos_mac_table_recieve_count Number of L3 recieve route entries in table
# TYPE junos_mac_table_recieve_count gauge
junos_mac_table_recieve_count{target="ex3200-1"} 2
# HELP junos_mac_table_total_count Number of entries in table
# TYPE junos_mac_table_total_count gauge
junos_mac_table_total_count{target="ex3200-1"} 27

This metrics is based on the output of show ethernet-switching table summary | display xml

<rpc-reply xmlns:junos="http://xml.juniper.net/junos/12.3R12/junos">
    <ethernet-switching-table-information junos:style="summary">
        <ethernet-switching-table junos:style="summary">
            <mac-table-entry junos:style="summary">
                <mac-table-total-count>27</mac-table-total-count>
                <mac-table-recieve-count>2</mac-table-recieve-count>
                <mac-table-dynamic-count>23</mac-table-dynamic-count>
                <mac-table-flood-count>2</mac-table-flood-count>
            </mac-table-entry>
        </ethernet-switching-table>
    </ethernet-switching-table-information>
    <cli>
        <banner></banner>
    </cli>
</rpc-reply>

Copy link
Owner

@czerwonk czerwonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@czerwonk czerwonk merged commit 7bfdf4e into czerwonk:master Oct 19, 2021
@kakkotetsu kakkotetsu deleted the ethernet-switching branch October 19, 2021 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants