# Supervision with metrics

**URL:** <https://forum.collaboraonline.com/t/supervision-with-metrics/2282>\
**Category:** Uncategorized\
**Created:** [December 30, 2023, 8:29pm UTC](https://forum.collaboraonline.com/t/supervision-with-metrics/2282 "2023-12-30T20:29:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![berfic001](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@berfic001](https://forum.collaboraonline.com/u/berfic001)\
**Post date:** [December 30, 2023, 8:29pm UTC](https://forum.collaboraonline.com/t/supervision-with-metrics/2282/1 "2023-12-30T20:29:22Z")

</div>

the metrics are very good for prometheus type supervision, but they are missing certain important metrics that we have on the admin page, namely: WOPI Host Views PID Document Memory Consumed Elapsed Time Idle Time Modified  
Do you know how I could recover these values ​​in order to extract them via prometheus  
I need to log this information

THANKS

---

<div class="post-metadata">

**Author:** ![mmeeks](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/mmeeks/32/371_2.png) [@mmeeks](https://forum.collaboraonline.com/u/mmeeks)\
**Post date:** [January 1, 2024, 10:34am UTC](https://forum.collaboraonline.com/t/supervision-with-metrics/2282/2 "2024-01-01T10:34:11Z")

</div>

If you read the Prometheus output - the format is not well designed for exporting structured data; so we mis-use it a bit like this - if you look at the end you will see for each document:

doc\_info{host=“localhost”,key=“https%3A%2F%2Flocalhost%3A9980%2Fwopi%2Ffiles%2Fopt%2Flibreoffice%2Fonline%2Ftest%2Fdata%2Fhello-world.odt”,filename=“hello-world.odt”,pid=“341946”} 1  
doc\_views{pid=“341946”} 1  
doc\_views\_active{pid=“341946”} 1  
doc\_is\_modified{pid=“341946”} 0  
doc\_memory\_used\_bytes{pid=“341946”} 14416  
doc\_cpu\_used\_seconds{pid=“341946”} 0.33  
doc\_open\_time\_seconds{pid=“341946”} 2  
doc\_idle\_time\_seconds{pid=“341946”} 2  
doc\_download\_time\_seconds{pid=“341946”} 0.02  
doc\_upload\_time\_seconds{pid=“341946”} 0

If you want to write a more powerful tool everything in the admin console comes from a websocket connection which you can make too - the protocol is not guarenteed to be stable, but pragmatically has mostly been so for quite a while; so you can connect, authenticate and scrape what you want.

If you want more fields there - its easy to add in the code, but each one adds weight to the prometheus data do:

`$ git grep -10 doc_upload_time_seconds`

Patches most welcome =)

---

<div class="post-metadata">

**Author:** ![berfic001](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@berfic001](https://forum.collaboraonline.com/u/berfic001)\
**Post date:** [January 2, 2024, 3:29pm UTC](https://forum.collaboraonline.com/t/supervision-with-metrics/2282/3 "2024-01-02T15:29:06Z")

</div>

> [@mmeeks](#):
>
> git grep -10 doc\_upload\_time\_second

OK thanks for your answer
