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

Draft dhcp scope stats #1837

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

englm
Copy link

@englm englm commented Jan 16, 2025

What this PR does / why we need it

This PR is about including DHCP scope statistic metrics in windows_exporter:

  • AddressesFree
  • AddressesFreeOnPartnerServer
  • AddressesFreeOnThisServer
  • AddressesInUse
  • AddressesInUseOnPartnerServer
  • AddressesInUseOnThisServer
  • PendingOffers
  • ReservedAddress

Example output

# HELP windows_dhcp_scope_addresses_free Number of addresses free on given scope on the DHCP server (AddressesFree)
# TYPE windows_dhcp_scope_addresses_free gauge
windows_dhcp_scope_addresses_free{scope_id="192.168.102.0",superscope_name=""} 50
# HELP windows_dhcp_scope_addresses_free_partner_server Number of addresses free on partner server based on the ownership assignment of the free address pool. Applies to a failover scope. (AddressesFreeOnPartnerServer)
# TYPE windows_dhcp_scope_addresses_free_partner_server gauge
windows_dhcp_scope_addresses_free_partner_server{scope_id="192.168.102.0",superscope_name=""} 20
# HELP windows_dhcp_scope_addresses_free_this_server Number of addresses free on this server based on the ownership assignment of the free address pool. Applies to a failover scope. (AddressesFreeOnThisServer)
# TYPE windows_dhcp_scope_addresses_free_this_server gauge
windows_dhcp_scope_addresses_free_this_server{scope_id="192.168.102.0",superscope_name=""} 30
# HELP windows_dhcp_scope_addresses_in_use Number of addresses in use on given scope on the DHCP server (AddressesInUse)
# TYPE windows_dhcp_scope_addresses_in_use gauge
windows_dhcp_scope_addresses_in_use{scope_id="192.168.102.0",superscope_name=""} 5
# HELP windows_dhcp_scope_addresses_in_use_partner_server Number of addresses leased/renewed by partner server. Applies to a failover scope. (AddressesInUseOnPartnerServer)
# TYPE windows_dhcp_scope_addresses_in_use_partner_server gauge
windows_dhcp_scope_addresses_in_use_partner_server{scope_id="192.168.102.0",superscope_name=""} 2
# HELP windows_dhcp_scope_addresses_in_use_this_server Number of addresses leased/renewed by this server. Applies to a failover scope. (AddressesInUseOnThisServer)
# TYPE windows_dhcp_scope_addresses_in_use_this_server gauge
windows_dhcp_scope_addresses_in_use_this_server{scope_id="192.168.102.0",superscope_name=""} 3
# HELP windows_dhcp_scope_pending_offers Number of pending offers on given scope on the DHCP server (PendingOffers)
# TYPE windows_dhcp_scope_pending_offers gauge
windows_dhcp_scope_pending_offers{scope_id="192.168.102.0",superscope_name=""} 0
# HELP windows_dhcp_scope_reserved_address Number of reserved addresses on given scope on the DHCP server (ReservedAddress)
# TYPE windows_dhcp_scope_reserved_address gauge
windows_dhcp_scope_reserved_address{scope_id="192.168.102.0",superscope_name=""} 1

Which issue this PR fixes

Special notes for your reviewer

Unmarshal of the get method's result has to be completed.
OperationUnmarshalCallbacks.InstanceResult does not support ValueTypeINSTANCEA at the moment.

englm added 3 commits January 16, 2025 14:36
Signed-off-by: Michael Engl <[email protected]>
Signed-off-by: Michael Engl <[email protected]>
Signed-off-by: Michael Engl <[email protected]>
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.

DHCP include scope statistics DHCP Free DHCP IPs
1 participant