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

  1. On the Infrastructure > Networks screen, click Edit and then Create traffic type.
  2. In the Create traffic type window, specify a custom name in the Name field and 9090 in the Port field. Then, click Create.

  3. 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.
  4. 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

  1. Log in into your Grafana user interface.
  2. Click the cogwheel icon in the left menu, and then select Data Sources.
  3. On the Data Sources tab, click Add data source.
  4. On the Data Sources / New screen, specify the following parameters:
    1. Enter a custom data source name in the Name field.
    2. Set Type to Prometheus.
    3. Enter http://<admin_panel_IP_address>:9090 in the URL field.
  5. Click Save & Test.

If the specified parameters are correct, the "Data source is working" message will appear.