Moogsoft Docs

Grafana Setup Tutorial

T his guide demonstrates how to set up an on-premises instance of Grafana alongside a running instance of Moogsoft AIOps 6.5.0.

The tutorial uses Grafana 4.6.3. You may need to make changes based on the Grafana version you are installing.

Before You Begin

Before you start the tutorial:

    • Set up Moogsoft AIOps on RHEL / Centos 7 .
    • You have the SSL c ertificat e used by Moogsoft AIOps.
    • You know the URL for Grafana. In this case, you can use the IP address of your machine. For example, 192.0.2.0.

Install Grafana

To begin the integration setup, install Grafana and enable SSL. For more information see the Grafana installation docs .

  1. Download the Grafana .rpm with this command:

    wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.6.3-1.x86_64.rpm
  2. Run the Grafana install as follows:

    sudo yum -y localinstall grafana-4.6.3-1.x86_64.rpm
  3. To enable SSL, edit the Grafana configuration file found at /etc/grafana/grafana.ini as follows:

    vi /etc/grafana/grafana.ini
  4. Edit the configuration fields as shown below, removing the semicolons (;) used to comment properties in .ini file s :

    Field Value
    protocol https
    root_url <your full grafana url> https:// <ip> :3000
    cert_file
    /etc/nginx/ssl/certificate.pem
    cert_key /etc/nginx/ssl/certificate.key

    See the example below:

    #################################### Server ##############################
    
    [server]
    # Protocol (http, https, socket)
    protocol = https
    
    # The ip address to bind to, empty will bind to all interfaces
    ;http_addr = 
    
    # The http port  to use
    ;http_port = 3000
    
    # The public facing domain name used to access grafana from a browser
    ;domain = localhost
    
    # Redirect to correct domain if host header does not match domain
    # Prevents DNS rebinding attacks
    ;enforce_domain = false
    
    # The full public facing url
    root_url = https://<Grafana domain name>:<http_port>
    
    # Log web requests
    ;router_logging = false
    
    # the path relative working path
    ;static_root_path = public
    
    # enable gzip
    ;enable_gzip = false
    
    # https certs & key file
    cert_file = /etc/nginx/ssl/certificate.pem
    cert_key = /etc/nginx/ssl/certificate.key

    This tutorial uses the default port 3000, if you want to edit http_port or any other fields see the Grafana configuration docs .

  5. Save the c hanges and exit the vi editor.

  6. Restart the Grafana server as follows:

    service grafana-server restart

Install the AIOps App for Grafana

You need to install Moogsoft AIOps App for Grafana to connect Grafana to Moogsoft AIOps. For more information about the app see Moogsoft AIOps App installation .

  1. To install the app for a local instance of Grafana, use this CLI command:

    grafana-cli plugins install moogsoft-aiops-app
  2. Restart the Grafana server as follows:

    service grafana-server restart

Configure the AIOps App

After installing the app, you need to enable and configure the connection from AIOps to Grafana.

  1. Log in to your Grafana instance at https:// <ip> :3000. The default login credentials are admin:admin .
  2. Navigate to Plugins > Apps and select the Moogsoft AIOps app.
  3. Edit the settings as follow s:

    Field Value
    URL <your moogsoft aiops url>
    Username <your graze username>
    Password <your graze username>

    The default Graze credentials are graze:graze .

  4. Enable the app. A 'Test Success' message appears if successful.

When you enable the app, it automatically includes the Moogsoft AIOps data source. If you want to change the data source later, you can edit Data Sources .

See Grafana Dashboards for information about default dashboards and how to use them.