Use Grafana without a datasource

Hi All,

I have a requirement to monitor Linux flavored servers without any standard monitoring tools and email the monitored values via email to any given point. Here I can run a script to gather data frequently in any format. For visualization purpose, I am thinking of using Grafana. Does anyone have experience in using Grafana without any standard data source or implement for a similar use case?

Thank you.

I can offer this solution

  1. Install any simple web-server or use self-made like this
  2. Collect metrics to files in web-server public folder. Store each metric as daily log-file e.g.
    CPU-201800512.log
    12:13 30
    12:14 55
    12:15 43
  3. Next step (it’s can be hard to you): create own http-datasource plugin. This datasource must read current daily file by metric names, parse it, discard data outside the requested period and pass result to Grafana.

It’s a very bad solution. So I don’t want to help you and write this datasource :slight_smile:

Another way: collect all metrics to mysql/posgresql and read them native datasource.

Thank you for the valuable inputs.

Actually I was thinking of store data to a mysql database and read from there. But there is lack of documents in which format these data should store in a database in order to read from the tables it self.

You can put all metrics to one table stats with columns time, name and value.
Data can be formatted by sql query e.g. graph panel requires rows as [value, time] so the query will be
select value, time from stats where name = 'CPU' and ... (range condition)

Thank you aikon. I am able to implement a solution as you mentioned. Anyone else who has implemented the same?