PUQ Mautic

Docker Grafana WHMCS module

A module for WHMCS that uses n8n workflows to deploy the Grafana service using Docker.

Description

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n

Before you start, it is important to read and familiarize yourself with the following articles at this link:
https://doc.puq.info/books/docker-modules

The WHMCS Docker Grafana module is designed for automated provisioning and management of Grafana instances on a Docker server. It seamlessly integrates with WHMCS, allowing businesses to sell and manage Grafana services efficiently.


Key Features

🚀 Automated Container Management

🔒 Service Control & Security

🛠️ Advanced Diagnostic Tools

🌍 Multilingual Support

⚙️ Fully Customizable Workflows


System Requirements

To run the WHMCS Docker Grafana module, ensure you have:
WHMCS version 8+
An n8n server for workflow automation
A server with Docker installed for container management (Installation Guide)


Installation & Setup

1️⃣ Environment Preparation

2️⃣ Module Installation

3️⃣ Workflow Customization

4️⃣ Testing & Deployment


Why Choose This Module?

Seamless automation – Reduces manual work and speeds up service deployment.
Highly customizable – Modify workflows to fit any business model.
User-friendly – Integrated within WHMCS with a simple setup process.


This module makes selling and managing Grafana instances through WHMCS easy, automated, and flexible! 🚀

image-1742759866818.png

image-1742759913643.png

image-1742759965249.png

 

What is Grafana

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n

Grafana is an open-source platform for monitoring, visualization, and analysis of time-series data. It allows users to create dashboards and graphs to gain insights from various data sources in real-time. Originally developed by Torkel Ödegaard in 2014, Grafana has grown into one of the most popular tools for observability and analytics, used by developers, IT operations teams, and businesses worldwide.

Key Features of Grafana

  1. Custom Dashboards – Users can build interactive dashboards with panels that display data from multiple sources.
  2. Wide Range of Data Sources – Supports Prometheus, InfluxDB, Elasticsearch, MySQL, PostgreSQL, Loki, and many more.
  3. Alerting System – Configurable alerts with notifications via Slack, PagerDuty, email, and other channels.
  4. User Management & Authentication – Role-based access control (RBAC) and integration with OAuth, LDAP, and other authentication systems.
  5. Plugins & Extensibility – Numerous plugins available for additional visualizations and data sources.
  6. Annotations – Add context to graphs with notes about specific events.
  7. Multi-Tenancy – Supports multiple organizations with isolated dashboards and data sources.
  8. Enterprise Support – A commercial version provides enhanced security, scalability, and team collaboration features.

Where is Grafana Used?

Grafana is widely used in various industries and IT environments, including:

1. IT Infrastructure Monitoring

2. Cloud & DevOps Monitoring

3. Application Performance Monitoring (APM)

4. Business Analytics & Finance

5. IoT and Industrial Monitoring

What Data Sources Can Grafana Work With?

Grafana supports a wide variety of data sources, making it a highly flexible visualization tool:

How Grafana Works

Grafana operates as a web-based application, typically deployed as a service accessible via a browser. The workflow involves:

  1. Connecting Data Sources: Configure one or more data sources like Prometheus, InfluxDB, or MySQL.
  2. Building Dashboards: Create panels displaying metrics in graphs, tables, or heatmaps.
  3. Setting Alerts: Define thresholds and notification channels for real-time alerts.
  4. User Access Management: Configure authentication and permissions for different users and teams.
  5. Extending with Plugins: Add visualization types, new data sources, or integrations with external systems.

image-1742760210378.png

Conclusion

Grafana is a powerful and versatile tool for visualizing and monitoring data across various domains. Its ability to integrate with numerous data sources and provide interactive dashboards makes it an essential tool for IT professionals, developers, and businesses. Whether you need to monitor cloud infrastructure, track application performance, analyze business data, or oversee industrial processes, Grafana provides an intuitive and highly customizable solution.

Changelog

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n
v1.0 Released 24-03-2025

First version

Installation and configuration guide

Installation and configuration guide

Basic concepts and requirements

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n

Before you start, it is important to read and familiarize yourself with the following articles at this link:
https://doc.puq.info/books/docker-modules

The WHMCS Docker Grafana module is part of the WHMCS Docker module series developed by PUQcloud. This module enables service providers to offer Grafana Docker containers as a service to their clients, allowing for seamless automation and integration.

The system consists of three core components:

🖥️ WHMCS Module

The core component, installed in WHMCS, manages service provisioning and automation from the WHMCS side.

📡 Debian 12 Server

A server running Debian 12 with the following pre-installed:
Docker – For container management

We have prepared instructions for installing and configuring Docker
https://doc.puq.info/books/docker-modules/page/installing-docker-for-puqcloud-modules

🔗 n8n Server

This server facilitates communication between the WHMCS module and the Docker server, ensuring smooth workflow execution.
To explore n8n’s full potential, visit the official n8n website for documentation, tutorials, and community support.


Key Features & Concepts

⚙️ Workflow Automation

n8n provides a graphical workflow builder, allowing users to automate various tasks, such as:
✔️ Sending notifications
✔️ Configuring firewalls on external routers
✔️ Managing DNS settings
✔️ Custom automation processes tailored to specific needs

🔄 Flexibility & Customization

The module offers personalized settings and supports elastic automation, giving clients full control over their n8n workflows.

 

Installation and configuration guide

WHMCS setup (install/update)

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n

Module is coded ionCube v13

Supported php version:

To install and update a module, you must perform one and the same action.


1. Download the latest version of the module.

PHP 8.2

wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Docker-Grafana/php82/PUQ_WHMCS-Docker-Grafana-latest.zip

PHP 8.1

wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Docker-Grafana/php81/PUQ_WHMCS-Docker-Grafana-latest.zip

PHP 7.4

wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Docker-Grafana/php74/PUQ_WHMCS-Docker-Grafana-latest.zip

All versions are available via link: https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Docker-Grafana/

2. Unzip the archive with the module.
unzip PUQ_WHMCS-Docker-Grafana-latest.zip
3. Copy and Replace "puqDockerGrafana" from "PUQ_WHMCS-Docker-Grafana" to "WHMCS_WEB_DIR/modules/servers/"
Installation and configuration guide

Preparing Docker Server

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n

To install the Docker server for this module, please follow the instructions at the following link:


https://doc.puq.info/books/docker-modules/page/installing-docker-for-puqcloud-modules
Installation and configuration guide

Setting up n8n workflow

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n

Overview

The Docker Grafana WHMCS module uses a specially designed workflow for n8n to automate deployment processes. The workflow provides an API interface for the module, receives specific commands, and connects via SSH to a server with Docker installed to perform predefined actions.

Prerequisites

Installation Steps

Install the Required Workflow on n8n

You have two options:

Option 1: Use the Latest Version from the n8n Marketplace

Option 2: Manual Installation

n8n Workflow API Backend Setup for WHMCS/WISECP

Configure API Webhook and SSH Access

Modify Template Parameters

In the Parameters block of the template, update the following settings:

image-1742762157130.png

image-1741285412110.png

Do not modify the following technical parameters:

Deploy-docker-compose

In the Deploy-docker-compose element, you have the ability to modify the Docker Compose configuration, which will be generated in the following scenarios:

image-1741875704524.png

image-1742762181184.png

nginx

In the nginx element, you can modify the configuration parameters of the web interface proxy server.

image-1741875960357.png

image-1742762207286.png

Bash Scripts

Management of Docker containers and all related procedures on the server is carried out by executing Bash scripts generated in n8n. These scripts return either a JSON response or a string.

image-1741876353319.png

 

 

Installation and configuration guide

Add server

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n
Add a new server to the system WHMCS.
System Settings->Servers->Add New Server

image-1741287291552.png

Attention: Important Information

The hostname field represents the actual domain of the server running Docker and must match the server_domain parameter in the n8n workflow. If they do not match, communication will not function correctly.
Additionally, this domain must be configured so that all its subdomains resolve to the IP address of the server running Docker.

image-1741287929855.png

In the Server Details section, select the "PUQ Docker Grafana" module and enter the correct username and password for the API endpoint in the n8n workflow.

Additionally, in the Access Hash field, insert the URL of the API entry point for the n8n workflow.

image-1742762415704.png

image-1742762449168.png

 

 

 

Installation and configuration guide

Product Configuration

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n
Add new product to WHMCS
System Settings->Products/Services->Create a New Product

In the Module settings section, select the "PUQ Docker Grafana" module

Installation and configuration guide

Metric Billing

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n

To bill certain metrics separately, you can use the standard WHMCS Metric Billing mechanism.

To configure it, you need to enable the required metrics and set the desired prices. Metrics work based on the standard WHMCS mechanism, the description of which can be found here:

https://docs.whmcs.com/products/configuration-options/usage-billing/

image-1741888208248.png

image-1741888239156.png

Installation and configuration guide

Email Template (puqDockerGrafana Welcome Email)

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template

image-1742764094674.png

Subject: 

Grafana Order Information

Body:

Dear {$client_name},

Your order has been accepted for implementation.

Product/Service: {$service_product_name}
Payment Method: {$service_payment_method}
Amount: {$service_recurring_amount}
Billing Cycle: {$service_billing_cycle}
Next Due Date: {$service_next_due_date}


The installation and setup of your Grafana instance is in progress.
Within the next 4-5 minutes, you will be able to use your Grafana instance.

Upon your first login, you will need to create an account.

Here is the link to your Grafana server.

https://{$service_domain}/

Thank you for choosing us.

{$signature}

image-1742764198279.png

 

Installation and configuration guide

Email Template (puqDockerGrafana Update Email)

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template

image-1742764324733.png

Subject: 

Grafana Update Information

Body:

Dear {$client_name},

Your instance is currently being updated.
You will be able to use your Grafana server again within 3 minutes.

Here is the link to your Grafana server.

https://{$service_domain}/
Thank you for choosing us.

{$signature}

image-1742764394511.png

 

 

 

 

Installation and configuration guide

Email Template (puqDockerGrafana Notification disk limit)

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template

image-1742764528601.png

Subject: 

Disk space usage {$disk_used_percentage}%

Body:

Dear {$client_name},

We want to inform you that your Grafana service is running low on disk space. 
Please take action to prevent service interruptions.

Service Details:

Product/Service: {$service_product_name}
Domain: {$service_domain}
Total Disk Space: {$disk_total}
Used Disk Space: {$disk_used} ({$disk_used_percentage}%)
Consider freeing up space or upgrading your plan if needed.

{$signature}

image-1742764568607.png

 

 

 

 

Admin Area

Admin Area

Product Information

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n

Admin Panel – Container Management Overview

The admin panel is structured into two main sections with additional control buttons for container management.

Control Buttons

Container Status & Resource Monitoring

Application Information

image-1742764800405.png

 

Client Area

Client Area

Home screen

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n

Client Area Overview – Logical Structure

The main screen of the client area is divided into three logical sections:

  1. Navigation Block

    • "Go to Grafana": Direct link to access the application.
    • "User Manual": Opens the official documentation or user guide.
  2. Resource Usage Block

    • Displays real-time statistics on container resource usage:
      • CPU Usage: Number of allocated CPUs and current load.
      • Memory Usage: RAM consumption, helping clients understand available capacity.
      • Disk Usage: Storage consumption within the container.
    • This section is crucial for users to monitor performance and determine whether they need to upgrade their package.
  3. Application Information & Controls

    • Application Version: Displays the installed software version.
    • Owner Information: Indicates the primary administrator of the application.
    • User List: Shows active users associated with the instance.
    • Reset Password Button: Allows the client to reset the administrator password for the application.

This clear structure ensures that users have quick access to their application, real-time monitoring of resource usage, and essential management functions in one place.

image-1742764975589.png

image-1742764992843.png

 

 

Client Area

IP Access Control

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n

In the client area, the client can configure access to their resource by entering allowed IP addresses in the appropriate section on the Restrict by IP page.

If no IP addresses are specified, access is open to all IP addresses.

image-1742327165778.png

Client Area

Reinstall

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n

The client has the option to fully reinstall the application, which will result in complete data loss.

This action can be performed on the Reinstall page, which also includes protection against accidental reinstallation.

image-1741882286068.png

Client Area

Metrics

Docker Grafana module WHMCS 

 Order now | Download | FAQ | n8n

If you use metrics for application traffic billing, the Metrics tab will display the usage statistics for the metrics.

image-1742765093238.png