Oracle Dashboard with graphite, collectd and pyorastats

Oracle Enterprise Manager console for Oracle database is a very nice tool when you have to view the database performance and take any action on querys, session or any other database activity, but some times you only need to show the performance graphs without login to the EM console.

I used the time series database Graphite to store the results of database performance, so we can see the past performance easily. Completing Graphite, I used grafana to facilitate the creation of dashboards. Graphite consists of three major components: Graphite-Web, Carbon metric daemons and Whisper time-series database library. If you are interested on Graphite you can view the project page on https://github.com/graphite-project/graphite-web

For collecting the database performance data I used collectd that have the wirte_graphite pluging and the pyorastats a python statistics database library with support for graphite and cacti output.
Nginx and uwsgi acts as webserver-appserver at the frontend.

All this is packaged in a container docker image for a fast deployment.

Components:

  • webserver: nginx
  • appserver: uwsgi
  • frontend: grafana & graphite python frontend
  • stats daemon: collectd
  • oracle stats: pyorastats

It is ready to run with 2 commands:

Image download

docker pull vmalaga/oracledashboard

run the docker

docker run -d -p 24:22 -p 83:80 vmalaga/oracledashboard

now go to the dockersetup page to configure database and graphite setup

http://localhost:83/dockersetup

You can access with you browser to the dashboard

when you finish to configure all parameters go to the grafana dashboard

http://localhost:83/grafana/#/dashboard/file/default.json

2 thoughts on “Oracle Dashboard with graphite, collectd and pyorastats

  1. Hello,

    I had a question, if I wanted to push data from oracle tables into graphite could I use pyrostats? If not do you have any suggestion of what I could use?

    Sincerely,
    Pranav Rao

    1. Hi Rao

      I use collectd and the write_graphite plugin to push data into graphite, so if you pass any valid value to collectd, it is translated into valid values for graphite, only you have to know if the value is a gauge or a counter

      print “PUTVAL %s/oracle/%s/gauge-disk_free interval=30 N:%s” % (self.hostname, sid, free_val) or
      print “PUTVAL %s/oracle_%s/counter-physicalio_datafile_reads interval=30 N:%s” % (self.hostname, sid, datafile_reads)

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *