-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* metrics * Fix code style issues with Black * reload linters * fix lint * add forced logout and client handler errors metric * Fix code style issues with Black * lint * Fix code style issues with Black --------- Co-authored-by: Lint Action <[email protected]>
- Loading branch information
1 parent
13a557a
commit c9e7599
Showing
15 changed files
with
215 additions
and
42 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
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,35 @@ | ||
from prometheus_client import Gauge, Counter | ||
|
||
GATHER_METRIC_DELAY_SEC = 3 * 60 # 3 min | ||
|
||
clients_amount_metric = Gauge( | ||
"clients_amount", "Users", labelnames=["pswd", "autoread"] | ||
) | ||
|
||
# Logging | ||
log_metric = Counter("log_info", "Logs metric", labelnames=["level"]) | ||
|
||
# Telegram | ||
incoming_commands_metric = Counter( | ||
"incoming_command", "Incoming commands metric", labelnames=["command_name"] | ||
) | ||
sent_message_metric = Counter("sent_message", "Sent messages metric") | ||
|
||
# Samoware | ||
samoware_response_status_code_metric = Counter( | ||
"samoware_response_sc", "Samoware reponses status code metric", labelnames=["sc"] | ||
) | ||
|
||
# Domain | ||
login_metric = Counter("login", "Login events metric", labelnames=["is_successful"]) | ||
relogin_metric = Counter( | ||
"relogin", "Relogin events metric", labelnames=["is_successful"] | ||
) | ||
revalidation_metric = Counter( | ||
"revalidation", "Revalidation events metric", labelnames=["is_successful"] | ||
) | ||
logout_metric = Counter("logout", "Logout events metric") | ||
forced_logout_metric = Counter("forced_logout", "Forced logout events metric") | ||
client_handler_errors_metric = Counter( | ||
"client_handler_error", "Client handler error events metric", labelnames=["type"] | ||
) |
Oops, something went wrong.