Clean up metrics

This commit is contained in:
Lauri Võsandi 2021-06-14 22:02:30 +03:00
parent edc31fae39
commit ab0a8f8cfd
1 changed files with 16 additions and 4 deletions

View File

@ -13,10 +13,22 @@ from sanic_wtf import SanicForm
from wtforms import IntegerField, StringField
from wtforms.validators import DataRequired, IPAddress, NumberRange
submit_count = Counter("pinecrypt_lease_submit", "IP updates", ["service"])
flush_count = Counter("pinecrypt_lease_flush", "IP assignment flushes", ["service"])
migration_count = Counter("pinecrypt_migration", "Client has migrated to this replica", ["replica"])
not_found_count = Counter("pinecrypt_lease_not_found", "Certificate not found", ["service"])
submit_count = Counter(
"pinecrypt_gateway_lease_updates",
"Client IP address updates.",
["service"])
flush_count = Counter(
"pinecrypt_gateway_lease_flushes",
"Client IP address flushes.",
["service"])
migration_count = Counter(
"pinecrypt_gateway_lease_migrations",
"Client migrations to this replica.",
["replica"])
not_found_count = Counter(
"pinecrypt_gateway_lease_not_found",
"Invalid connection attempts.",
["service"])
class LeaseUpdateForm(SanicForm):
service = StringField("Service name")