Project

General

Profile

action #156061

Updated by rainerkoenig 4 months ago

## Motivation 
 One additional metric for Grafana could be the number of YAML files that we have in the `schedule/yam` folder, reflecting what we have refactored already on the tickets to reduce the overall amount of YAML schedules in openQA.  

 ## Additional info 
 Despite the existence of a [GitHub data source](https://grafana.com/grafana/plugins/grafana-github-datasource/) in Grafana the job is probaly easier to achieve by a small custom script that does a frequent checkout of the GitHub repo master branch and then does a  
 ``` 
 find schedule/yam -name "*.yaml" | wc -l 
 ```  
 to obtain the count of YAML files.  

 This count then should be sent to InfluxDB (easy by using Telegraf that executes frequently as a wrapper for that script), so that Grafana can use it. 

 ## Other thoughts 
 Since the amount of ideas for metrics in our squad is increasing we should really consider, if we could consider to use an own Yam specific InfluxDB database, if you browse the data sources in Grafana, you see that there are currently 9 different InfluxDB databases for various needs, so we should discuss with the tools team how much effort it would be to our own workflows that use a Yam specific database, which would make our metrics less confusing because we don't see all the other metrics from other teams in the `default` InfluxDB.  

 ## Acceptance criteria 
 - **AC1:** Create custom script to get the measurement 
 - **AC2:** Create a Telegraf wrapper that calls this script by a defined schedule (e.g. daily) and pipes it to InfluxDB 
 - **AC3:** Create a panel in Grafana that visualizes the measurements either as a time series (to see the progress) or a gauge (to see the current value)

Back