Running a Query in Grafana

This section describes how to execute a query in Grafana.

The PCF Dashboard creates a panel containing the graph that is based on the query that it ingests. Grafana brings up a panel to visualize data that is retrieved for one or more queries. You can run canned and custom queries from the dashboard. The canned queries are preexisting in the dashboard with the define syntax. Custom queries permit you to formulate queries that return specific information.

  1. On the PCF Application Dashboard, in the left pane, click the explore icon to open the menu. On hovering over the icon, the tooltip text appears as Explore.

  2. In the Explore pane, click the drop-down to choose the data source as Prometheus.

  3. Do one of the following:

    • To execute a built-in query, click the Metrics drop-down and choose the query that you want to run.

    • To execute a custom query, enter the query in the corresponding field next to Metrics.

  4. Click Run Query.

    The query retrieves the information from Prometheus and displays it in a graphical representation.