Skip to Main Content
Cloud Management and AIOps


This is an IBM Automation portal for Cloud Management and AIOps products. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).

Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.

Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Delivered
Workspace Instana
Categories Synthetic
Created by Guest
Created on Sep 22, 2023

Add node_module prom-client to synthetic-pop-javascript-playback-engine

Intro:

This idea, makes alot of sense for people that wants to use synthetic checks to query a prometheus endpoint. 

Implementation from your side is simply add the prom-client module in synthetic checks pods.

 

Description:

If you add the prometheus module, we will be able to use this module to query prometheus metrics and use them in the synthetic checks.

Example, collect metrics from Prometheus endpoint:

const http = require('http')

const url = require('url')

const client = require('prom-client')

// Create a Registry which registers the metrics

const register = new client.Registry()

// Add a default label which is added to all metrics

register.setDefaultLabels({

  app: 'example-nodejs-app'

})

// Enable the collection of default metrics

client.collectDefaultMetrics({ register })

// Define the HTTP server

const server = http.createServer(async (req, res) => {

  // Retrieve route from request object

  const route = url.parse(req.url).pathname

  if (route === '/metrics') {

    // Return all metrics the Prometheus exposition format

    res.setHeader('Content-Type', register.contentType)

    res.end(register.metrics())

  }

})

// Start the HTTP server which exposes the metrics on http://localhost:8080/metrics

server.listen(8080)

 

Then I can process the data and trigger a synthetic check when a series is not as expected.

From your side you only need to have the module available in the modules directory, to install you can simply:

npm install prom-client

cheers

Idea priority Urgent
  • Admin
    Dania Grave de Peralta Reyes
    Reply
    |
    Oct 16, 2023
    Support for prom-client module will be included in chart version 1.1.0, released with Instana v260
  • Admin
    Cross Ganaway
    Reply
    |
    Sep 27, 2023

    Hi. We will consider adding this module in a future build of the PoP engine. Keep in mind that the PoP will timeout a script that executes for too long, so you don't want to have an overly complex script processing the response.

    1 reply