VMmanager 6: Administrator guide

Grafana. Connecting an external server

ISPSystem

You can connect your own server with Grafana to VMmanager. To ensure that the connection settings are not deleted when you update the platform, you need to add the settings information to the Docker configuration file.

How to connect


  1. Create the docker-compose.yaml file with the following contents:

        version: "3.5"
        services:
          carbonapi:
            ports:
            - mode: host
              published: "8080"
              target: "8080"

    8080 — TCP port for Grafana connection

  2. Encode the file in base64:

    openssl base64 -in docker-compose.yaml -out docker-compose.base64
  3. Add the contents of the encoded docker-compose.base64 file to the Patches/carbonapi/base64_compose section of /opt/ispsystem/vm/config.json on the server with VMmanager. After insertion, the Patches section should look like this:

    Example of the Patches section
        "Patches": {
          "carbonapi": {
            "base64_compose": "<contents of the docker-compose.base64 file>"
          },
          "vmrdns": {
            "base64_compose": "dmVyc2lvbjogIjMuNSIKc2Vydm...=="
          }
        },

    Note

    For convenience, you can use tools to work with JSON files. For example, using JSON formatter you can convert config.json to a readable form, insert the necessary information, and then return the file to the minimized format.

  4. Execute the command:

    vm start

    If the settings are applied successfully, the output of the command will indicate that the carbonapi container has been recreated:

    Recreating carbonapi ... 
    Recreating carbonapi ... done
  5. Add a data source to Grafana:
    1. Enter ConfigurationData sourcesAdd data sourceGraphite.
    2. Specify the connection parameters. In the URL field, enter the IP address of the server with VMmanager and the connection port specified in step 1. For example, http://192.0.2.1:8080.

    3. Press Save & test. If the connection is successful, the message "Data source is working" appears, if unsuccessful - "Bad gateway".


Thank you for your feedback!
Was the article useful?
Tell us why not:

it does not match the title

it was hard to understand

I didn't find the answer

recommendations from the article did not help

other

Tell us what you didn't like in the article: