# Monitor FDB in production

**URL:** <https://forums.foundationdb.org/t/monitor-fdb-in-production/3350>\
**Category:** Using FoundationDB\
**Created:** [May 31, 2022, 11:17pm UTC](https://forums.foundationdb.org/t/monitor-fdb-in-production/3350 "2022-05-31T23:17:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![chetan\_pg](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@chetan\_pg](https://forums.foundationdb.org/u/chetan_pg)\
**Post date:** [May 31, 2022, 11:17pm UTC](https://forums.foundationdb.org/t/monitor-fdb-in-production/3350/1 "2022-05-31T23:17:21Z")

</div>

How to monitor FDB . I read the document which says lot of metrics available in log files or fdbcli -exec ‘status json’ but not clear what and how to parse stats easily every 5 sec. and create dashboard if possible.

Do we have any readymade tools for monitoring FDB. Any easy way to parse the log files or json and send stats to tools like newrelic/graphana?

I am also not clear when reading “monitor metric” in the document which says for example we monitor " _Database Availability Percentage_" .Where is this stats reported as I checked in json status and also all .xml files under logdir but did not find any such stats.

---

<div class="post-metadata">

**Author:** ![alexmiller](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/alexmiller/32/326_2.png) [@alexmiller](https://forums.foundationdb.org/u/alexmiller)\
**Post date:** [May 31, 2022, 11:20pm UTC](https://forums.foundationdb.org/t/monitor-fdb-in-production/3350/2 "2022-05-31T23:20:45Z")

</div>

Please see [What do you monitor?](https://forums.foundationdb.org/t/what-do-you-monitor/184), and in particular [[doc] Add "Monitored Metrics" page to the docs. by sfc-gh-almiller · Pull Request #6594 · apple/foundationdb · GitHub](https://github.com/apple/foundationdb/pull/6594) which has yet to roll out to the website.

---

<div class="post-metadata">

**Author:** ![chetan\_pg](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@chetan\_pg](https://forums.foundationdb.org/u/chetan_pg)\
**Post date:** [May 31, 2022, 11:48pm UTC](https://forums.foundationdb.org/t/monitor-fdb-in-production/3350/3 "2022-05-31T23:48:20Z")

</div>

I read this "what do you monitor " and “monitor metrics” from FDB documentation but I don’ want to spend time in writing python/golang program to parse the json status output , capture these stats every 5 sec and then send it to time series DB or tools like newrelic and then write queries in those tools to draw graphs etc. What i am looking for an easy solution/tool to montior the FDB in production with the metrics suggested to monitor.

Do you have any code/tool to share written in python or golang as a sample ?

---

<div class="post-metadata">

**Author:** ![tudor](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/tudor/32/1253_2.png) [@tudor](https://forums.foundationdb.org/u/tudor)\
**Post date:** [June 1, 2022, 4:37am UTC](https://forums.foundationdb.org/t/monitor-fdb-in-production/3350/4 "2022-06-01T04:37:20Z")

</div>

Here you go, because I promised Alex privately that I’ll share this. This is what we use in our deployment (which is quite small). No warranty, YMMV, etc. [fdb\_prometheus\_proxy.py · GitHub](https://gist.github.com/tudor/dd17fe94a89b56566738a012d6a3e7a8)

This runs as a server that Prometheus can poll, which works for us, but you can adapt to your heart’s content.

---

<div class="post-metadata">

**Author:** ![chetan\_pg](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@chetan\_pg](https://forums.foundationdb.org/u/chetan_pg)\
**Post date:** [June 1, 2022, 2:13pm UTC](https://forums.foundationdb.org/t/monitor-fdb-in-production/3350/5 "2022-06-01T14:13:17Z")

</div>

thanks very much for sharing this program. I will refer to this and the FDB document to come up with some solution

---

<div class="post-metadata">

**Author:** ![andrew.noyes](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/andrew.noyes/32/443_2.png) [@andrew.noyes](https://forums.foundationdb.org/u/andrew.noyes)\
**Post date:** [June 1, 2022, 4:14pm UTC](https://forums.foundationdb.org/t/monitor-fdb-in-production/3350/6 "2022-06-01T16:14:58Z")

</div>

> [@alexmiller](#):
>
> which has yet to roll out to the website.

It actually did roll out recently: [Monitored Metrics — FoundationDB 7.1](https://apple.github.io/foundationdb/monitored-metrics.html)

---

<div class="post-metadata">

**Author:** ![chetan\_pg](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@chetan\_pg](https://forums.foundationdb.org/u/chetan_pg)\
**Post date:** [June 1, 2022, 4:42pm UTC](https://forums.foundationdb.org/t/monitor-fdb-in-production/3350/7 "2022-06-01T16:42:21Z")

</div>

yes i did read 7.1 document on monitored metrics … i was looking for readymade solution but looks like there is none . The python program provided is a good start to refer so thanks all for the help .
