-
Notifications
You must be signed in to change notification settings - Fork 1
Hazelcast Grafana App
jet_demo
App
The grafana
app provides a simple and quick way to integrate Hazelcast with Grafana by including several commands for accessing Grafana along with pre-configured Hazelcast dashboards. For example, you can import the included dashboards into Grafana with the import_grafana
command and monitor the entire cluster in a single view.
The Grafana app is part of the padogrid distribution. Run the create_app
to install it in your workspace.
create_app -product hazelcast -app grafana
Support for Prometheus is enabled by default for all Hazelcast clusters created by the create_cluster
command. You can enable or disable it by setting the prometheus.enabled
property in each cluster's etc/cluster.properties
file as follows:
# etc/cluster.properties
# By default, Prometheus is enabled.
prometheus.enabled=true
By default, the clusters created by create_cluster
also enable Clustered JMX for Management Center. To enable Prometheus for Management Center, however, you must explicitly configure the Management Center as shown below.
# Change directory to the cluster's directory
cd_cluster
vi bash_sh/setenv.sh
Add the following in the bin_sh/setenv.sh
file. Note that you also need to configure Prometheus to include the Management Center as one of its targets as described in the 5.2. Prometheus section.
# Port number can be arbitrary but the same port number must
# be included in the Prometheus configuration file.
MC_JAVA_OPTS="-Dhazelcast.mc.prometheusExporter.enabled=true \
-Dhazelcast.mc.prometheusExporter.port=2222"
Restart the Management Center.
stop_mc
start_mc
Grafana is supported via the JMX exporter provided by Prometheus. It is already included in the distribution and fully integrated with Hazelcast out of the box. You can learn more about the exporter from the following site:
URL: https://github.com/prometheus/jmx_exporter
There are three (3) required software components that you must install before you can use the grafana
app.
- JQ - JSON Processor
- Prometheus
- Grafana
curl
The PadoGrid grafana
app relies on JQ to process JSON objects.
URL: https://stedolan.github.io/jq
Include it in your PATH:
# Assuming jq is placed in your home bin directory:
export PATH=~/bin:$PATH
PadoGrid includes integrated support for Prometheus and Grafana, greatly simplifying the installation and management steps.
Install Prometheus using install_padogrid
and update_padogrid
:
install_padogrid -product prometheus
update_padogrid -product prometheus
Start Prometheus from the grafana
app:
cd_app grafana/bin_sh
./start_prometheus
You can monitor Prometheus from your browser:
To view a complete list of metrics:
- All avalable metrics: http://localhost:9090/api/v1/label/name/values
- Metadata: http://localhost:9090/api/v1/metadata
- Prometheus specifics: http://localhost:9090/metrics
- Federated:
curl -G http://localhost:9090/federate -d 'match[]={__name__!=""}'
Install Grafana using install_padogird
and update_padogrid
:
# Install Grafana Enterprise
install_padogrid -product grafana-enterprise
update_padogrid -product grafana-enterprise
# Or install Grafana OSS
install_padogrid -product grafana-oss
update_padogrid -product grafana-oss
Start Grafana from the grafana
app:
cd_app grafana/bin_sh
./start_grafana
Once Grafana is running, use your web browser to set the user account as follows:
User Name: admin
Password: admin
The grafana
app has been preconfigured with the above user name and password. If you have a different account, then you can change them in setenv.sh
. Note that the included commands require the user with administration privileges
❗️ If you are running this app in the Windows environment then make sure to install curl
from Cygwin. Other implementations may not work properly.
The dashboards are organized by Grafana folders and they can be found in the following directory:
cd_app grafana
ls etc/dashboards
The following dashboard folders are included in this distribution.
-
Hazelcast-perf_test - A set of dashboards for monitoring the metrics specific to the
perf_test
app. - Hazelcast - A set of dashboards for monitoring a single Hazelcast cluster.
- HazelcastDual - A set of dashboards for comparing two (2) Hazelcast clusters side-by-side.
- HazelcastAll - A set of dashboards for federating multiple Hazelcast clusters.
- Padogrid - A set of dashboards for PadoGrid specific dashboards.
If Hazelcast is running on Kubernetes, then you need to change the default label value to namespace
or service
by executing padogrid_update_cluster_templating
as follows.
./padogrid_update_cluster_templating -label namespace
The above command changes the default label, job
, to namespace
so that the Hazelcast metrics can be filtered by Kubernetes namespace. For non-Kubernetes, padogrid_update_cluster_templating
is not necessary since the dashboards are predefined with the default label, job
.
To import all folders, run import_folder -all
as follows.
cd bin_sh
./import_folder -all
To import the default folder, i.e., Hazelcast-perf_test
, run import_folder
as follows.
cd bin_sh
./import_folder
To import folders individually, specify the -folder
option.
# To import the Hazelcast-perf_test folder in 'etc/dashboards':
./import_folder -folder Hazelcast-perf_test
# To import the Hazelcast folder in 'etc/dashboards':
./import_folder -folder Hazelcast
# To import the HazelcastDual folder in 'etc/dashboards':
./import_folder -folder HazelcastDual
# To import the HazelcastAll folder in 'etc/dashboards':
./import_folder -folder HazelcastAll
# To import the Padogrid folder in 'etc/dashboards':
./import_folder -folder Padogrid
# To import all folders in 'etc/dashboards':
./import_folder -all
The Hazelcast-perf_test
folder includes the perf_test
app dashboards. To view data in these dashboards, you must run the perf_test
ingestion and transaction scripts. The following command creates the default app, perf_test
, in your workspace.
create_app
For perf_test
details, see perf_test README.
The Hazelcast*
folders contain the main dashboard with the prefix, 00Main
. The main dashboard is the main console for navigating all the dashboards in the respective folder. It has the layout similar to the Management Center as shown in the screen shot in Section 10.2 Hazelcast Folder.
To quickly activate the dashboards with data, you can run perf_test
with the group-workflow-*.properties
files.
The Hazelcast dasboards support multiple clusters. If you are running Prometheus in PadoGrid, then to include multiple clusters, you must add them in the etc/prometheus.yml
file. You can use the the included etc/prometheus-clusters.yml
as an example. This file configures two (2) Hazelast clusters named, 'myhz' and 'myhz2'.
You can also export your dashboards to use them as backup or templates by executing the export_folder
command.
# Export all folders found in Grafana. By default, the dashboards are
# exported in the export/ directory. You can change it in setenv.sh.
./export_folder -all
You must convert the exported dashboards to templates by executing the export_to_template
command before you can import them back to Grafana. This is due to the Grafana dependency of non-unique local IDs. The generated templates are portable and can be imported into any instance of Grafana using the import_folder
command.
# Convert the exported folders to templates. The templates are placed in
# the templates/ directory. See the usage for details.
./export_to_template
If you made changes to dashboards from the browser and want to save them in the local file system in the form of templates then execute the padogrid_sync_folders
command. This command exports all of the dashboards in the Hazelcast*
folders, creates templates, applies the required Grafana variables to the templates, and re-imports the templates to Grafana.
# Using 'job':
./padogrid_sync_folders -label job
# To make dashboards editable
./padogrid_sync_folders -label job -editable
# For Kubernetes:
./padogrid_sync_folders -label namespace
# To make dashboards editable
./padogrid_sync_folders -label namespace -editable
The bin_sh
directory contains many useful commands for working with dashboards. You can display the usage of each command by specifying the -?
option as shown below.
./create_folder -?
Usage:
./create_folder [-folder <folder-name>] [-?]
Creates the specified Grafana folder.
Default: ./create_folder -folder Hazelcast-perf_test
cd_app grafana/bin_sh
./stop_grafana
./stop_prometheus
PadoGrid Manual
Overview
- Home
- PadoGrid in 5 Minutes
- Quick Start
- Introduction
- Bundle Catalogs
- Building PadoGrid
- Supported Data Grid Products and Downloads
- PadoGrid Components
- Installing PadoGrid
- Root Workspaces Environments (RWEs)
- Initializing PadoGrid
- Bash Auto-Completion
- Viewing PadoGrid Summaries
- Updating Products
- Upgrading PadoGrid
- Migrating Workspaces
- PadoGrid Pods
- Kubernetes
- Docker
- Apps
- Software List
Operations
- Workspace Lifecycle Management
- Creating RWE
- Creating Workspace and Starting Cluster
- Managing Workspaces
- Understanding Workspaces
- Understanding Clusters
- Running Clusters
- Default Port Numbers
- Running Clusters Independent of PadoGrid
- Running Apps
- Understanding Groups
- Running Groups
- Understanding Bundles
- User Bundle Repos
- Using Bundle Templates
- Bundle Repo Guidelines
- User Bundle Catalogs
- Private Bundle Repos
- Gitea Repos
- Running Bundles in Container
- PadoGrid Addon Jars
- Understanding PadoGrid Pods
- Tested Vagrant Boxes
- VM-Enabled Pods
- Multitenancy
- Multitenancy Best Practices
- PadoGrid Configuration Files
Tools
Platforms
Clouds
Pado
Geode/GemFire
- Geode CLASSPATH
- Geode Kubernetes
- Geode Minikube
- Geode Minikube on WSL
- Geode Docker Compose
- Geode Grafana App
- Geode
perf_test
App - Geode WAN Example
- Geode Workspaces on VMs
- Geode on AWS EC2
- Reactivating Geode Workspaces on AWS EC2
Hazelcast/Jet
- Hazelcast CLASSPATH
- Creating Jet Workspace
- Configuring Hazelcast Addon
- HQL Query
- Hazelcast Kubernetes
- Hazelcast GKE
- Hazelcast Minikube
- Hazelcast Minikube on WSL
- Hazelcast Minishift/CDK
- Hazelcast OpenShift
- Hazelcast Docker Compose
- Hazelcast Desktop App
- Hazelcast Grafana App
- Hazelcast
jet_demo
App - Hazelcast
perf_test
App - Hazelcast WAN Example
- Hazelcast Workspaces on VMs
- Hazelcast on AWS EC2
- Reactivating Hazelcast Workspaces on AWS EC2
ComputeDB/SnappyData
Coherence
Hadoop
Kafka/Confluent
Mosquitto
- Mosquitto CLASSPATH
- Mosquitto Overview
- Installing/Building Mosquitto
- Clustering MQTT
- Cluster Archetypes
- Enabling Mosquitto SSL/TLS
- Mosquitto Docker Compose
- MQTT perf_test App
Redis
Spark