DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations

Trending

  • WireMock: The Ridiculously Easy Way (For Spring Microservices)
  • Simplifying SAP Data Integration With Google Cloud
  • How To Become a 10x Dev: An Essential Guide
  • Enriching Kafka Applications With Contextual Data
  1. DZone
  2. Data Engineering
  3. Data
  4. Grafana Analysis and Visualization with CA APM

Grafana Analysis and Visualization with CA APM

This article is an analysis and visualization of Grafana, a multi-platform open-source analytical and visualization tool, with CA APM.

Prem Prakash user avatar by
Prem Prakash
·
Aug. 26, 20 · Tutorial
Like (3)
Save
Tweet
Share
3.28K Views

Join the DZone community and get the full member experience.

Join For Free

Introduction

A Grafana is a multi-platform open-source analytical and visualization tool that consists of multiple individual panels arranged in a grid. It turns your time-series database (TSDB) data into beautiful graphs and visualizations. The panels interact with configured data sources, AWS CloudWatch, Prometheus, MySQL, InfluxDB, SQL Server, etc.

 Setup Grafana:

  • Refer to the instructions for your OS in the Installation section for instructions.
  • Open your web browser and go to http://localhost:3000/
  • On the login page, type admin for the username and password.

CA APM monitors the performance of applications and lets IT managers diagnose bottlenecks and other problems, it has capabilities to spot anomalies earlier, predict behavior, and enable automatic corrective actions.

CA APM Integration with Grafana

Grafana requires the NovaTec plugin to integrate with CA APM. NovaTec plugin enables you to query all the metrics from CA APM and visualize them in Grafana Dashboards.

  1. Install it from here: https://github.com/NovaTecConsulting/ca-apm-grafana-datasource
  2. Copy the contents of this repository to the plugin directory of your Grafana installation

Windows location: C:\Program Files\GrafanaLabs\grafana>\data\plugins\ca-apm-datasource

Linux : /var/lib/grafana/plugins/ca-apm-datasource

    3. Reload Grafana and click DataSource

        Now You can see new Datasource as CA APM

4. Click on Add DataSource in URL to provide APM Enterprise Manager's API endpoint and proper authentication details (HTTP basic authentication). Click "Save & Test"

Changes in Servers to be Monitored

Download and install CA APM Infrastructure Agent, This should be already available if you have established CA APM monitoring in your enterprise. UNIX just untar it and windows unzip the Agent file.

Start Infrastructure Agent: ./apmia-ca-installer.sh install (UNIX)

a. IntroscopeAgent.profile changes (/opt/caapm/apmia/core/config)

  1. Configure agentManager.url.1=<APM endpoint URL>
  2. Default Agent Name: introscope.agent.agentName=CPM_Agent
  3. introscope.epagent.plugins.stateless.names=CPU,DISK
  4. introscope.epagent.stateless.CPU.command=/usr/bin/perl /opt/caapm/apmia/extensions/<Enterprise>/linuxCPU.pl
  5. introscope.epagent.stateless.CPU.delayInSeconds=15

**Note item#4 is requested for PERL script If its Python Script replace it with next row

introscope.epagent.stateless.POSTGRES.command=/usr/bin/python /opt/caapm/apmia/extensions/<Org>/pg_apm_grafana.py

 Link for https://github.com/forprem/pg-metrics/blob/master/pg_apm_grafana.py

Above python file contains code which generates metrics for CA APM

b. These scripts (item#4 above) has to be created and stored in this location:

opt/caapm/apmia/extensions/<Enterprise>

c. The script will return the metrics data in this format

{"type" : "<a supported metric type>", 

"name" : "<a unique metric name (including path but excluding host|process|agent)>", 

"value" : "<the metric value>"} }

      Sample:.

       <metric type="IntCounter" name="Postgres| Replication: Master Replay Lag (#)" value="-56" />

d. Restart agent if its required ./apmia-ca-installer.sh restart

Verify data in CA APM

Now you can see your metrics in CA APM




Pull Metrics in Grafana

Create a new Dashboard in Grafana or import any of the existing JSON dashboards. Select a CA APM data source which was created earlier in this article.

https://grafana.com/docs/grafana/latest/getting-started/getting-started/



    • Browse available metrics to construct a metric query
    • Refine the query afterward with basic regular expressions, e.g. wildcards
  • Below given CA APM Metrics will be converted into an above form in the screenshot

    SuperDomain/APMIA|localhost|Infrastructure|CPM_Agent|Postgres| Activity: Number of Backend idle in transactions (#)

Final Dashboard maybe like this after adding multiple panels

Conclusion

In this article, we have seen what Grafana Dashboard is and how to configure it. There are most organizations are already having CA APM tools for capturing metrics to their servers. These organizations do not want to change their setup. With my configuration, we can use the existing CA APM tool and just adopt the new Grafana open-source dashboard. In my opinion, it is a great tool to get started with monitoring live resources from the production environment as it is free of cost and easy to install and use. The dashboards can be easily created with some basic knowledge of SQL and can be set to refresh on a schedule. 

Grafana Visualization (graphics) Open source Metric (unit)

Opinions expressed by DZone contributors are their own.

Trending

  • WireMock: The Ridiculously Easy Way (For Spring Microservices)
  • Simplifying SAP Data Integration With Google Cloud
  • How To Become a 10x Dev: An Essential Guide
  • Enriching Kafka Applications With Contextual Data

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: