summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-01-03 18:23:36 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-01-03 18:23:36 +0100
commitc1b4e78328788a026718ec68f1383007918cbe93 (patch)
treeb8b2fe07acf1af391200f555e09a946d14fd08c7
parent5baace1803787aee956861704124e0c46e0ba029 (diff)
Add "mpd_" prefix to all metric names
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--src/main.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.rs b/src/main.rs
index a06ee75..003e4be 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -93,13 +93,13 @@ async fn metrics_handler(mpd_data: web::Data<Mutex<MpdClient>>) -> Result<String
let instance = String::new(); // TODO
let res = vec![
- Metric::new("uptime" , stats.uptime , "The uptime of mpd", &instance).into_metric()?,
- Metric::new("playtime" , stats.playtime , "The playtime of the current playlist", &instance).into_metric()?,
- Metric::new("artists" , stats.artists , "The number of artists", &instance).into_metric()?,
- Metric::new("albums" , stats.albums , "The number of albums", &instance).into_metric()?,
- Metric::new("songs" , stats.songs , "The number of songs", &instance).into_metric()?,
- Metric::new("db_playtime" , stats.db_playtime , "The database playtime", &instance).into_metric()?,
- Metric::new("db_update" , stats.db_update , "The updates of the database", &instance).into_metric()?,
+ Metric::new("mpd_uptime" , stats.uptime , "The uptime of mpd", &instance).into_metric()?,
+ Metric::new("mpd_playtime" , stats.playtime , "The playtime of the current playlist", &instance).into_metric()?,
+ Metric::new("mpd_artists" , stats.artists , "The number of artists", &instance).into_metric()?,
+ Metric::new("mpd_albums" , stats.albums , "The number of albums", &instance).into_metric()?,
+ Metric::new("mpd_songs" , stats.songs , "The number of songs", &instance).into_metric()?,
+ Metric::new("mpd_db_playtime" , stats.db_playtime , "The database playtime", &instance).into_metric()?,
+ Metric::new("mpd_db_update" , stats.db_update , "The updates of the database", &instance).into_metric()?,
]
.into_iter()
.map(|m| {