-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #266 from membermatters/feature/more-prometheus-me…
…trics Feature/more prometheus metrics
- Loading branch information
Showing
48 changed files
with
1,056 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
from prometheus_client import Counter, Histogram | ||
|
||
device_connections_total = Counter( | ||
"mm_device_connections_total", | ||
"Number of device connections", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_disconnections_total = Counter( | ||
"mm_device_disconnections_total", | ||
"Number of device disconnections", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_authentications_total = Counter( | ||
"mm_device_authentications_total", | ||
"Number of device authentications", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_checkins_total = Counter( | ||
"mm_device_checkins_total", | ||
"Number of device checkins", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_access_successes_total = Counter( | ||
"mm_device_access_successes_total", | ||
"Number of successful access swipes logged", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_access_failures_total = Counter( | ||
"mm_device_access_failures_total", | ||
"Number of failed access swipes logged", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_force_reboots_total = Counter( | ||
"mm_device_force_reboots_total", | ||
"Number of force reboots", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_syncs_total = Counter( | ||
"mm_device_syncs_total", | ||
"Number of syncs", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_force_bumps_total = Counter( | ||
"mm_device_force_bumps_total", | ||
"Number of force bumps", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_force_locks_total = Counter( | ||
"mm_device_force_locks_total", | ||
"Number of force locks", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_force_unlocks_total = Counter( | ||
"mm_device_force_unlocks_total", | ||
"Number of force unlocks", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_interlock_session_activations_total = Counter( | ||
"mm_device_interlock_session_activations_total", | ||
"Number of interlock session activations", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_interlock_sessions_left_on_total = Counter( | ||
"mm_device_interlock_sessions_left_on_total", | ||
"Number of interlock sessions left on", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_interlock_sessions_deactivated_total = Counter( | ||
"mm_device_interlock_sessions_deactivated_total", | ||
"Number of interlock session deactivations", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_interlock_sessions_rejected_total = Counter( | ||
"mm_device_interlock_sessions_rejected_total", | ||
"Number of interlock session rejections", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_interlock_sessions_cost_cents = Counter( | ||
"mm_device_interlock_sessions_cost_cents", | ||
"Cost of interlock sessions", | ||
["type", "id", "name"], | ||
) | ||
|
||
device_interlock_session_duration_seconds = Histogram( | ||
"mm_device_interlock_session_duration_seconds", | ||
"Duration of interlock sessions", | ||
["type", "id", "name"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 3.2.25 on 2024-06-03 11:50 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("access", "0018_auto_20240525_0016"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="accesscontrolleddevice", | ||
name="description", | ||
field=models.CharField(max_length=500, verbose_name="Description/Location"), | ||
), | ||
migrations.AlterField( | ||
model_name="interlocklog", | ||
name="reason", | ||
field=models.CharField(blank=True, max_length=500, null=True), | ||
), | ||
] |
Oops, something went wrong.