Google EKM tools
To achieve this level of monitoring, we leverage three powerful tools: Cloudprober, Prometheus, and Grafana, which are used in tandem to create a comprehensive monitoring and alerting system.Cloudprober
Cloudprober is a monitoring software developed by Google that actively tests and measures the availability and performance of services. It operates on the principle of proactive probing, meaning it continuously checks and verifies whether various system components are functioning as expected. Cloudprober supports multiple protocols like HTTP, UDP, and ICMP, and is highly configurable, enabling you to define custom probes based on your specific monitoring needs.Prometheus
Prometheus is an open-source monitoring system with a powerful time-series database at its core. It is particularly well-suited for capturing and analyzing metrics in a high-uptime environment. Prometheus collects and stores metrics as time series data, meaning each metric is stored along with its timestamp and optional key-value pairs called labels. Its query language, PromQL, enables you to select and aggregate data, offering significant flexibility for viewing and analyzing data.Grafana
Grafana is a popular open-source analytics and interactive visualization web application. It provides charts, graphs, and alerts for the web when connected to supported data sources, the most common of which are time series databases like Prometheus. Grafana has powerful and easy-to-use dashboarding capabilities that enable you to create and share various types of visualizations to better understand complex data.Integration of Cloudprober, Prometheus, and Grafana
You can use these three tools together to create a comprehensive monitoring and alerting system. You can configure Cloudprober to check the health of various system components continuously. Prometheus scrapes an endpoint that Cloudprober exposes to share the metrics it collects and then stores and processes this data, offering insights and the ability to trigger alerts based on predefined conditions. Grafana integrates seamlessly with Prometheus to visualize this data. This combination enables proactive monitoring (with Cloudprober), data storage and alerting (through Prometheus), and sophisticated data visualization (by using Grafana), making it an ideal setup for maintaining system health and performance.Set up Cloudprober
To set up Cloudprober, perform the following tasks:- Install Cloudprober.
- Configure Cloudprober to monitor a CryptoHub device.
- Test and verify the Cloudprober configuration.
Install Cloudprober
Refer to the Getting Started documentation on the official Cloudprober website for instructions on installing Cloudprober ( cloudprober.org/docs/overview/getting-started/).Configure Cloudprober
After installing Cloudprober, you must configure it to monitor specific CryptoHub metrics, such as latency and response codes.Create a configuration file: Cloudprober requires a configuration file (typically named
cloudprober.cfg) to define what to monitor and how. Create this file in a directory of your choice.Define probes for latency: In your configuration file, define aprobe block for latency. This instructs Cloudprober to periodically send requests to the CryptoHub and measure the time taken for a response. The following example shows a sample configuration:
None
Configure probes for response codes: Similarly, add another probe block in your configuration file to monitor HTTP response codes. This helps in identifying error responses or any unexpected status codes.
None
Start Cloudprober: With your configuration file ready, start Cloudprober by using the following command:Replace
Shell
cloudprober.cfg with the path to your actual configuration file.Test and verify the Cloudprober configuration
After Cloudprober is up and running, you should verify that it’s correctly monitoring the CryptoHub.To check probing status, examine the Cloudprober admin interface or log files. Ensure that they are active and not reporting any errors.
Manually validate the latency and response code metrics collected by Cloudprober to ensure accuracy.
Integrate Prometheus with Cloudprober
After setting up Cloudprober, the next critical step is to integrate it with Prometheus, which serves as the primary tool for storing and querying the collected monitoring data.Download and install Prometheus
Perform the following steps to download and install Prometheus:Visit the Prometheus download page (prometheus.io/download/) and download the current version of Prometheus for your operating system.
Configure Prometheus
Perform the following steps to configure Prometheus to scrape metrics from Cloudprober:Prometheus uses a configuration file (usually named
prometheus.yml) to define the sources from which it scrapes data. Open this file in a text editor.Add Cloudprober as a scrape target in thescrape_configs section of the Prometheus configuration. The configuration looks similar to the following sample:
None
Start Prometheus
Perform the following steps to start Prometheus:Set up basic Prometheus alerts
To leverage Prometheus’s alerting capabilities, perform the following tasks:Define alert rules
In the Prometheus configuration directory, create a file namedalert.rules to define your alert conditions. For instance, you can set an alert for high latency or frequent error responses, similar to the following sample alert rule:
None
Add alert rules to the Prometheus configuration
Include the alert rules file in yourprometheus.yml under the rule_files section:
None
Reload the Prometheus configuration
After updating the configuration, reload Prometheus to apply the changes. This can usually be done by sending a SIGHUP signal to the Prometheus process or by restarting Prometheus. These steps successfully integrate Prometheus with Cloudprober for advanced monitoring of the CryptoHub. This setup enables you to collect and store valuable performance data and also set up alerts for proactive monitoring of system health.Visualize metrics with Grafana
Perform the following tasks to visualize the collected metrics with Grafana.Install Grafana
Perform the following steps to install Grafana:Visit the Grafana download page (grafana.com/grafana/download) and select the appropriate version for your operating system. Then, follow these installation instructions:grafana.com/docs/grafana/latest/
After youstart the Grafana server, access the web interface of the Grafana Dashboard, usually available athttp://localhost:3000.
Integrate Grafana with Prometheus
Perform the following steps to integrate Grafana with Prometheus:To add Prometheus as a data source, first, in the Grafana dashboard, go to Configuration (gear icon) and select Data Sources.
Then, select [ Add Data Source ], select Prometheus as the type, and configure the Prometheus server details. By default, the URL should behttp://localhost:9090, if it runs on the same machine.
Create dashboards
Perform the following steps to create dashboards for visualizing CryptoHub metrics:To create a new dashboard in Grafana, select the**+** icon and select Dashboard. Then, select [ Add new panel ] to start customizing your first metric visualization.
Select Prometheus as the data source and use a query to display latency metrics, such as:
probe_duration_seconds{job="cloudprober"}.Customize the panel with appropriate visualization types (such as graphs, gauges) and settings (such as time ranges, thresholds).To design a response codes dashboard, perform the following steps:
- Add another panel to the dashboard or create a new dashboard specifically for response codes.
- Use a query that captures response code metrics, such as:
probe_http_response_code{job="cloudprober"}. - Configure the panel to display the data effectively, possibly using bar charts or tables.

