We're hiring! Check out our currently open positions »


This year I took part at PHPCon Poland as a speaker. I spoke about InfluxDB, Telegraf and Grafana to monitor your PHP application and your infrastructure.

I spoke about InfluxDB few times this year at different events sometime focused on monitoring your infrastructure but this time the main argument was PHP and I share how you can use your application as data provider for business and debug metrics.

If your application changes and you work in a dynamic environment with few teams that release and deploy code more that once a year you need a way to anaylize your changes.

How can you trust a new version of your application if you don’t have an idea about how it works?

Logs are useful but they are hard to store and manage, time series are a great way to have a real time feeling about the behavior of your code, they are less expensive and easier to manage.

You can not replace your logs with a time series, you need to have them and also have a good way to read and analyze them, but in the meantime a good dashboard with the core metrics provided by your application helps to have the situation under control.

A time series in practice is a list of points where each point represents a value in a specific time. There are time series anywhere, if you don’t trust me I have few examples:

  • temperature in your room
  • CPU usage
  • login in your application
  • 500 error code
  • Your releases
    "measurement": "success_login",
    "value": 1,
    "timestamp": 1415463675

All can be distributed in time and if your value is smart enough (like a simple number) you can sum, group, order, aggregate them and in general manipulate these points to alert, create a dashboard or understand when the behaviour is not common and make your decision.

InfluxDB is just one of the open source projects that you can use, the open source community provides different integrations and PHP is just one of them.

There are other open source project like Prometheus or Graphite and also as a service. Tools like AppDynamics, New Relic and so on manage this kind of data but what is really great to know is the difference between something designed to support this data and a general purpose database like ElasticSearch, Mongo and Cassandra:

Managing a monitoring system is not easy, InfluxDB is in Go and it’s a binary, very easy to start but the first goal for a monitoring system is to be live when everything is down.

You need to be confident about it because it alerts you in case of problems. Managing your own system gives you big flexiblity and allows you to create smart integrations with your entire environment. It’s not just for developers but you can create a dashboard for other teams like customer service or HR with business metrics.

Check my slides and ping me on Twitter if you have some questions @gianarb.

  • php
  • conference

blog comments powered by Disqus