How I can capture real time event such cpu , ram consumptions into log format.
I want the such events in log format to forward the same to my syslog server.
I tired to find the logs file where all these event catpure but no luck.
If anyone help me on the same will be greatful.
Thanks
santoshH
You could write something that issues http requests to the API’s /data
endpoint (documentation here), and then converts the responses to whatever format you want. If you open your browser’s console, you can see many examples of data
calls getting issued, when a chart is being updated.
If realtime and want one api call the /allmetrics endpoint might be useful too.
https://london.my-netdata.io/api/v1/allmetrics?format=json
May save you having to do a call per chart.
But all depends really on what data you want and how.
Allmetrics gets latest collected value while data endpoint would let you query a time range.