emcrisostomo / fswatch

A cross-platform file change monitor with multiple backends: Apple OS X File System Events, *BSD kqueue, Solaris/Illumos File Events Notification, Linux inotify, Microsoft Windows and a stat()-based backend.
https://emcrisostomo.github.io/fswatch/
GNU General Public License v3.0
5.06k stars 330 forks source link

Feature request: expose Prometheus metrics #216

Closed GiedriusS closed 6 years ago

GiedriusS commented 6 years ago

It would be very useful to have some kind of metrics exposed to Prometheus and other monitoring systems through a simple HTTP server which serves /metrics in fswatch. Please consider adding such feature to fswatch.

t3hk0d3 commented 6 years ago

To be honest thats weird idea. Why would you expect simple command line tool to hold HTTP server to just output metrics?

Also not sure what kind of metrics you are expecting? Number of changed files?

If you really need it - you can implement that by simple wrapper.

emcrisostomo commented 6 years ago

Hi @GiedriusS,

I think this should be orthogonal to fswatch. You should be able to get what you need by sending fswatch output to some process that gathers data and gets what you need. A quick way to go could be an ELK stack (https://www.elastic.co/) to ingest data and continue from there. It's almost trivial to set up using containers.

I'm closing this, and feel free to update it if you have more information.