Monitoring and Alerting Bold BI in Windows Using Grafana and Prometheus.
Configuring Grafana and Prometheus
Follow these steps to configure Grafana and Prometheus on the Windows machine.
-
Click here to download the Grafana exe file.
-
Click here to download the Prometheus folder.
-
Click here to download the Windows Exporter for Prometheus.
-
Install the Grafana and Node Exporter on the Windows machine.
-
After installation, access http://localhost:3000 for Grafana UI, http://localhost:9182 for Windows exporter UI, and http://localhost:9090 for Prometheus UI .
-
Use admin as a username and password for Grafana login.
-
Unzip the Prometheus zipped folder and run the Prometheus.exe file.
-
You must run the Prometheus exe in Bold BI installed machine.
-
Open the Prometheus.yaml file and re-run the exe file for changes. Add the following content for monitoring the IIS server.
-
After adding, save the yaml file, and again start the Prometheus.
-
After you log in to the Grafana, add a Prometheus data source.
-
Select Prometheus in the list.
-
Give the name and host of the data source.
-
Click save and test.
Monitoring Bold BI
-
If your data source works fine, It will show as follows.
-
Create a dashboard for monitoring in Grafana.
Note: Import some dashboards existing in the Grafana Labs.
-
Use the following dashboard ID for monitoring all Bold BI IIS services.
-
Enter the dashboard ID and click Load.
-
Name the dashboard, select the data source, and click Import.
-
After importing, you will see the dashboard, which gives details about Bold BI.
Note: click here for more dashboards.
Configure alerting
Follow these steps for configuring alerts in Grafana.
-
Before creating an alert, create a notification channel.
-
For creating a notification channel, first create an SMTP configuration for Grafana.
-
Go to local disk C->Program Files->Grafanalabs->Grafana->config->default.ini.
-
Open the default.ini file, go to the SMTP section, and give the SMTP credentials.
-
Refer to here to configure SMTP in our Gmail for Grafana.
-
Save the changes in default.ini.
-
Go to the services app and right click on Grafana and give restart.
-
Add a contact point for alerting the notification.
-
Click the new contact point to add your email for receiving alerting notifications.
-
You can also test the notifications by clicking the test icon.
-
Then, create the alert rules by clicking the new alert rule.
-
Grafana will send you the default alerts.
-
Now, create an alert that will send a mail whenever any of the Bold BI services goes down.
-
Open the default.ini file located in the Grafana installation directory C->Program Files->Grafanalabs->Grafana->config->default.ini. in a text editor.
-
Find the section called [alerting] and add the following lines.
[alerting]
evaluator-frequency = 1m
rule-1 = {"alert": "IIS Service Alert", "expr": "win_service_status{name=\"W3SVC\"} == 0", "for": "5m", "labels": {"severity": "critical"}, "annotations": {"summary": "IIS service is down on {{ $labels.instance }}"}, "notifications": [{"type": "email", "send_resolved": true, "to": "youremail@example.com"}]}
- Save the default.ini file and restart the Grafana server for the changes to take effect.
- This rule will alert you via email when the IIS service is down on a server.
- You can create customized alerts based on your requirements by referring to here.