Monitor and graph (Grafana) DHCP Scope utilization.

cancel
Showing results for 
Search instead for 
Did you mean: 

Monitor and graph (Grafana) DHCP Scope utilization.

L1 Bithead

Is anyone using the API or another method to pull dhcp scope utilization? I'd like to pull these stats via API and graph utilization using Grafana?

1 ACCEPTED SOLUTION

Accepted Solutions

L4 Transporter

 

 

Hi @MatthewDeSantos, you can grab the lease information via API:

 

https://{{host}}/api/?key={{key}}&type=op&cmd=<show><dhcp><server><lease><interface>{{interface-name}}</interface></lease></server></dhcp></show>

 

 The response will look something like this:

 

<response status="success">
    <result>
        <interface name="ethernet1/2" id="17" allocated="11" total="51">
            <entry name="192.168.0.50">
                <ip>192.168.0.50</ip>
                <mac>00:00:00:00:00:00</mac>
                <state>reserved</state>
            </entry>
            <entry name="192.168.0.121">
                <ip>192.168.0.121</ip>
                <mac>00:00:00:00:00:00</mac>
                <state>reserved</state>
            </entry>
            <entry name="192.168.0.115">
            .
            .
            .

 

Where you would take allocated=11 and total=51, to derive the utilisation. In this case 22%.

 

Hope this helps!

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂

View solution in original post

2 REPLIES 2

L4 Transporter

 

 

Hi @MatthewDeSantos, you can grab the lease information via API:

 

https://{{host}}/api/?key={{key}}&type=op&cmd=<show><dhcp><server><lease><interface>{{interface-name}}</interface></lease></server></dhcp></show>

 

 The response will look something like this:

 

<response status="success">
    <result>
        <interface name="ethernet1/2" id="17" allocated="11" total="51">
            <entry name="192.168.0.50">
                <ip>192.168.0.50</ip>
                <mac>00:00:00:00:00:00</mac>
                <state>reserved</state>
            </entry>
            <entry name="192.168.0.121">
                <ip>192.168.0.121</ip>
                <mac>00:00:00:00:00:00</mac>
                <state>reserved</state>
            </entry>
            <entry name="192.168.0.115">
            .
            .
            .

 

Where you would take allocated=11 and total=51, to derive the utilisation. In this case 22%.

 

Hope this helps!

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂

View solution in original post

L1 Bithead

Thanks for the reply, would you happen to know if this could be translated into a grafana query/graph?

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!