redis_keys.py
69 lines
| 2.9 KiB
| text/x-python
|
PythonLexer
r2 | # -*- coding: utf-8 -*- | |||
r112 | # Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors | |||
r2 | # | |||
r112 | # Licensed under the Apache License, Version 2.0 (the "License"); | |||
# you may not use this file except in compliance with the License. | ||||
# You may obtain a copy of the License at | ||||
r2 | # | |||
r112 | # http://www.apache.org/licenses/LICENSE-2.0 | |||
r2 | # | |||
r112 | # Unless required by applicable law or agreed to in writing, software | |||
# distributed under the License is distributed on an "AS IS" BASIS, | ||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
# See the License for the specific language governing permissions and | ||||
# limitations under the License. | ||||
r2 | ||||
r153 | BASE = "appenlight:data:{}" | |||
r2 | ||||
REDIS_KEYS = { | ||||
r153 | "tasks": { | |||
"add_reports_lock": BASE.format("add_reports_lock:{}"), | ||||
"add_logs_lock": BASE.format("add_logs_lock:{}"), | ||||
r2 | }, | |||
r153 | "counters": { | |||
"events_per_minute_per_user": BASE.format("events_per_minute_per_user:{}:{}"), | ||||
"reports_per_minute": BASE.format("reports_per_minute:{}"), | ||||
"reports_per_hour_per_app": BASE.format("reports_per_hour_per_app:{}:{}"), | ||||
"reports_per_type": BASE.format("reports_per_type:{}"), | ||||
"logs_per_minute": BASE.format("logs_per_minute:{}"), | ||||
"logs_per_hour_per_app": BASE.format("logs_per_hour_per_app:{}:{}"), | ||||
"metrics_per_minute": BASE.format("metrics_per_minute:{}"), | ||||
"metrics_per_hour_per_app": BASE.format("metrics_per_hour_per_app:{}:{}"), | ||||
"report_group_occurences": BASE.format("report_group_occurences:{}"), | ||||
"report_group_occurences_alerting": BASE.format( | ||||
"report_group_occurences_alerting:{}" | ||||
), | ||||
"report_group_occurences_10th": BASE.format("report_group_occurences_10th:{}"), | ||||
"report_group_occurences_100th": BASE.format( | ||||
"report_group_occurences_100th:{}" | ||||
), | ||||
r2 | }, | |||
r153 | "rate_limits": { | |||
"per_application_reports_rate_limit": BASE.format( | ||||
"per_application_reports_limit:{}:{}" | ||||
), | ||||
"per_application_logs_rate_limit": BASE.format( | ||||
"per_application_logs_rate_limit:{}:{}" | ||||
), | ||||
"per_application_metrics_rate_limit": BASE.format( | ||||
"per_application_metrics_rate_limit:{}:{}" | ||||
), | ||||
r2 | }, | |||
r153 | "apps_that_got_new_data_per_hour": BASE.format( | |||
"apps_that_got_new_data_per_hour:{}" | ||||
), | ||||
"apps_that_had_reports": BASE.format("apps_that_had_reports"), | ||||
"apps_that_had_error_reports": BASE.format("apps_that_had_error_reports"), | ||||
"apps_that_had_reports_alerting": BASE.format("apps_that_had_reports_alerting"), | ||||
"apps_that_had_error_reports_alerting": BASE.format( | ||||
"apps_that_had_error_reports_alerting" | ||||
), | ||||
"reports_to_notify_per_type_per_app": BASE.format( | ||||
"reports_to_notify_per_type_per_app:{}:{}" | ||||
), | ||||
"reports_to_notify_per_type_per_app_alerting": BASE.format( | ||||
"reports_to_notify_per_type_per_app_alerting:{}:{}" | ||||
), | ||||
"seen_tag_list": BASE.format("seen_tag_list"), | ||||
r2 | } | |||