Skip to content

Commit

Permalink
improve dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
satkunas committed Dec 5, 2024
1 parent 8941987 commit 7bc3564
Show file tree
Hide file tree
Showing 3 changed files with 397 additions and 73 deletions.
84 changes: 72 additions & 12 deletions conf/monitoring/statsd.d/packetfence.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
title = registered/unregistered online devices
family = packetfence
context = chart.context
units = devices
units = # of devices
priority = 91000
type = line
dimension = source.packetfence.devices.online_registered 'registered' last 1 1
Expand All @@ -28,7 +28,7 @@
title = devices roles
family = packetfence
context = chart.context
units = devices
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.registered_per_role.*' '' last 1 1
Expand All @@ -38,7 +38,7 @@
title = device types
family = packetfence
context = chart.context
units = devices
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.registered_per_device_type.*' '' last 1 1
Expand All @@ -48,7 +48,7 @@
title = device classes
family = packetfence
context = chart.context
units = devices
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.registered_per_device_class.*' '' last 1 1
Expand All @@ -58,7 +58,7 @@
title = device manufacturers
family = packetfence
context = chart.context
units = devices
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.registered_per_device_manufacturer.*' '' last 1 1
Expand All @@ -68,7 +68,7 @@
title = device vlans
family = packetfence
context = chart.context
units = devices
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.registered_per_vlan.*' '' last 1 1
Expand All @@ -78,7 +78,7 @@
title = device connection types
family = packetfence
context = chart.context
units = devices
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.registered_per_connection_type.*' '' last 1 1
Expand All @@ -88,7 +88,7 @@
title = device ssids
family = packetfence
context = chart.context
units = devices
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.registered_per_ssid.*' '' last 1 1
Expand All @@ -98,31 +98,91 @@
title = device switches
family = packetfence
context = chart.context
units = devices
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.registered_per_switch.*' '' last 1 1

[devices.connected_per_device_class]
name = devices.connected_per_device_class
title = device classes
family = packetfence
context = chart.context
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.connected_per_device_class.*' '' last 1 1

[devices.connected_per_connection_type]
name = devices.connected_per_connection_type
title = connection types
family = packetfence
context = chart.context
units = devices
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.connected_per_connection_type.*' '' last 1 1

[devices.connected_per_device_manufacturer]
name = devices.connected_per_device_manufacturer
title = device manufacturers
family = packetfence
context = chart.context
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.connected_per_device_manufacturer.*' '' last 1 1

[devices.connected_per_device_type]
name = devices.connected_per_device_type
title = device types
family = packetfence
context = chart.context
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.connected_per_device_type.*' '' last 1 1

[devices.connected_per_role]
name = devices.connected_per_role
title = roles
family = packetfence
context = chart.context
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.connected_per_role.*' '' last 1 1

[devices.connected_per_ssid]
name = devices.connected_per_ssid
title = ssid
title = ssids
family = packetfence
context = chart.context
units = devices
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.connected_per_ssid.*' '' last 1 1

[devices.connected_per_switch]
name = devices.connected_per_switch
title = switches
family = packetfence
context = chart.context
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.connected_per_switch.*' '' last 1 1

[devices.connected_per_vlan]
name = devices.connected_per_vlan
title = vlans
family = packetfence
context = chart.context
units = # of devices
priority = 91000
type = line
dimension = pattern 'source.packetfence.devices.connected_per_vlan.*' '' last 1 1

[redis.queue_stats_count]
name = redis.queue_stats_count
title = redis queue stats counters
Expand Down
67 changes: 67 additions & 0 deletions conf/stats.conf.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,39 @@ mysql_query=select connection_type, count(distinct mac) from locationlog where e
interval=720s
management=true

[metric 'total number of connected devices per device class']
type=mysql_query
statsd_type=gauge
statsd_ns=source.packetfence.devices.connected_per_device_class
mysql_query=select ifnull(device_class, 'unknown') , count(distinct node.mac) from locationlog right join node on node.mac=locationlog.mac where end_time is null group by device_class
interval=720s
management=true

[metric 'total number of connected devices per device manufacturer']
type=mysql_query
statsd_type=gauge
statsd_ns=source.packetfence.devices.connected_per_device_manufacturer
mysql_query=select ifnull(device_manufacturer, 'unknown') , count(distinct node.mac) from locationlog right join node on node.mac=locationlog.mac where end_time is null group by device_manufacturer
interval=720s
management=true

[metric 'total number of connected devices per device type']
type=mysql_query
statsd_type=gauge
statsd_ns=source.packetfence.devices.connected_per_device_type
mysql_query=select ifnull(device_type, 'unknown') , count(distinct node.mac) from locationlog right join node on node.mac=locationlog.mac where end_time is null group by device_type
interval=720s
management=true

[metric 'total number of connected devices per role']
type=mysql_query
statsd_type=gauge
statsd_ns=source.packetfence.devices.connected_per_role
mysql_query=select ifnull(name, 'none'), count(distinct node.mac) from locationlog right join node on node.mac=locationlog.mac left join node_category on node.category_id=node_category.category_id group by name
interval=60s
randomize=true
management=true

[metric 'total number of connected devices per ssid']
type=mysql_query
statsd_type=gauge
Expand All @@ -120,6 +153,22 @@ mysql_query=select ssid, count(distinct mac) from locationlog where ssid != '' a
interval=720s
management=true

[metric 'total number of connected devices per switch']
type=mysql_query
statsd_type=gauge
statsd_ns=source.packetfence.devices.connected_per_switch
mysql_query=select switch, count(distinct mac) from locationlog where switch != '' and end_time is null group by switch
interval=720s
management=true

[metric 'total number of connected devices per vlan']
type=mysql_query
statsd_type=gauge
statsd_ns=source.packetfence.devices.connected_per_vlan
mysql_query=select vlan, count(distinct mac) from locationlog where vlan != '' and end_time is null group by vlan
interval=720s
management=true

[metric 'total number of unregistered devices']
type=mysql_query
statsd_type=gauge
Expand All @@ -129,6 +178,15 @@ interval=60s
randomize=true
management=true

[metric 'number of devices currently connected']
type=mysql_query
statsd_type=gauge
statsd_ns=source.packetfence.devices.connected
mysql_query=select count(distinct mac) from locationlog where vlan != '' and end_time is null
interval=60s
randomize=true
management=true

[metric 'number of devices currently registered']
type=mysql_query
statsd_type=gauge
Expand Down Expand Up @@ -205,6 +263,15 @@ interval=60s
randomize=true
management=true

[metric 'number of pending security events']
type=mysql_query
statsd_type=gauge
statsd_ns=source.packetfence.security_events_pending
mysql_query=select count(distinct mac) from security_event where status='pending'
interval=60s
randomize=true
management=true

[metric 'number of successful radius authentications in the last day']
type=mysql_query
statsd_type=gauge
Expand Down
Loading

0 comments on commit 7bc3564

Please sign in to comment.