Using built-in Prometheus for monitoring
To use built-in Prometheus, you need to open a TCP port for the Prometheus API to be accessible from the outside. If you have an external Grafana account and want to use it for monitoring Virtuozzo Hybrid Infrastructure, you can add built-in Prometheus as a data source. Using the added Prometheus data source, you can import the default Grafana dashboards from Virtuozzo Hybrid Infrastructure or create new ones.
To open a port for the Prometheus API
- On the Infrastructure > Networks screen, click Edit and then Create traffic type.
-
In the Create traffic type window, specify a custom name in the Name field and 9090 in the Port field. Then, click Create.
- Click Assign to networks next to the Custom traffic types section, and then add the created traffic type to your public network by selecting the corresponding check box.
- Click Save to apply the changes.
You can now access the Prometheus web-based user interface at http://<admin_panel_IP_address>:9090. For more information on using Prometheus, refer to its documentation.
To add Prometheus as a data source to Grafana
- Log in into your Grafana user interface.
- Click the cogwheel icon in the left menu, and then select Data Sources.
- On the Data Sources tab, click Add data source.
- On the Data Sources / New screen, specify the following parameters:
- Enter a custom data source name in the Name field.
- Set Type to Prometheus.
- Enter http://<admin_panel_IP_address>:9090 in the URL field.
- Click Save & Test.
If the specified parameters are correct, the "Data source is working" message will appear.