sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #08780
[Merge] ~troyanov/maas-kpi/+git/maas-kpi:add-missing-stats into maas-kpi:master
Anton Troyanov has proposed merging ~troyanov/maas-kpi/+git/maas-kpi:add-missing-stats into maas-kpi:master.
Commit message:
feat: add tags, dhcp, vault, tls to daily stats
Fetch following metrics:
- tags_total_count
- tags_automatic_tag_count
- tags_with_kernel_opts_count
- dhcp_snippets_node_count
- dhcp_snippets_subnet_count
- dhcp_snippets_global_count
- vault_enabled
- tls_configuration_enabled
- tls_configuration_cert_validity_days
Requested reviews:
Alberto Donato (ack)
For more details, see:
https://code.launchpad.net/~troyanov/maas-kpi/+git/maas-kpi/+merge/443670
--
Your team MAAS Committers is subscribed to branch maas-kpi:master.
diff --git a/maaskpi/dailystats.py b/maaskpi/dailystats.py
index 56f5526..964191d 100644
--- a/maaskpi/dailystats.py
+++ b/maaskpi/dailystats.py
@@ -178,6 +178,19 @@ class DeploymentStats(StatsMixin):
# number of deployments this stat is aggregating counts for
deployment_count: int = 1
+ tags_total_count: int = 0
+ tags_automatic_tag_count: int = 0
+ tags_with_kernel_opts_count: int = 0
+
+ dhcp_snippets_node_count: int = 0
+ dhcp_snippets_subnet_count: int = 0
+ dhcp_snippets_global_count: int = 0
+
+ vault_enabled: int = 0
+
+ tls_configuration_enabled: int = 0
+ tls_configuration_cert_validity_days: int = 0
+
class DailyStatsSeries(SeriesHelper):
class Meta:
@@ -319,6 +332,17 @@ def get_entry_stats(data) -> DeploymentStats:
),
subnets_v4=get("network_stats", "subnets_v4"),
subnets_v6=get("network_stats", "subnets_v6"),
+ tags_total_count=get("tags", "total_count"),
+ tags_automatic_tag_count=get("tags", "automatic_tag_count"),
+ tags_with_kernel_opts_count=get("tags", "with_kernel_opts_count"),
+ dhcp_snippets_node_count=get("dhcp_snippets", "node_count"),
+ dhcp_snippets_subnet_count=get("dhcp_snippets", "subnet_count"),
+ dhcp_snippets_global_count=get("dhcp_snippets", "global_count"),
+ vault_enabled=get("vault", "enabled"),
+ tls_configuration_enabled=get("tls_configuration", "tls_enabled"),
+ tls_configuration_cert_validity_days=get(
+ "tls_configuration", "tls_cert_validity_days"
+ ),
)
Follow ups