Blog: 18th June 2019 | DevOps | Featured Technology: Hubot, Grafana Dashboards , Prometheus, Slack
Grafana is well known dashboard which is visualized time series data. Most DevOps engineers currently use Grafana to configure various kind of data sources to generate reports. Below I am using two AWS instance to demonstrate the Grafana Dashboard with Hubot and Slack ; one instance to install the Grafana and Prometheus (Prometheus as a data source ) and another one to install Hubot (chatbot).
Let’s Start Configuring!
Here I am not going to explain on how to launch an AWS E2 instance. However if you are new to AWS please check this link. Also to please refer below links to install and configure Prometheus with node exporter. Install Prometheus Link | Install Node Exporter Link.
I know I have sent you in different directions with links to various sources to prepare the initial configurations however I hope you can appreciate that I didn’t add these configurations to this blog due to the length of this blog being very long and also my intention of focusing on providing info on the integrations of Grafana Dashboard with Hubot and Slack.
Time To Have FUN..!
First Install Grafana.
Here I am going to install Grafana with yum repository. It is really easy and if you need more installations methods please check this link.
Once you have finished the initial installations, we can then move forward to configure the Hubot. For more information please check this link.
npm install -g yo generator-hubot
Once you hit ‘yo hubot’ this will run the hubot setup and prompt you for some question related to its configurations. Make sure to grant permissions to the required folder, Otherwise, this yo hubot installation will present some errors. If you get some process break errors due to permission issues, don’t worry, you can always runt the yo hubot again. In my installations, I have grant chmod 777 <directory>
chmod -Rf 777 insight-nodejs/
chmod -Rf 777 /myhubot/
Once the hubot installation had ended, we wil l then have to integrate Slack with Hubot.
Integrate Slack with Hubot!
We have to install the hubot-grafana module under the Hubot installed directory:
npm install hubot-grafana --save
Once the installation process finished add “hubot-grafan” line in to external-scripts.json file.
Once done, for all configurations, we have to create a Slack app by integrating the Hubot API.