This the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

    PromQL Library

    PromQL is a powerful language to query metrics, but it could be challenging for beginners. To ease the learning curve of PromQL, Sysdig provides a set of curated examples, called PromQL Library. It helps you perform complex queries against your metrics with one click and get insight into your infrastructure problems which was not previously possible with Sysdig querying. For example, identify containers > 90% limit and counting pods per namespace, and so on.

    You have the following categories currently to experiment with PromQL:

    • Kubernetes

    • Infrastructure

    • Troubleshooting

    • PromQL 101

    Access PromQL Library

    1. Log in to Sysdig Monitor.

    2. Click Explore from the left navigation pane.

    3. On the Explore tab, click PromQL Library.

      The tab opens to a list of PromQL examples.

    Use PromQL Library

    Click Try me to open PromQL Query Explore. A visualization corresponding to the query will be displayed. You can do the following with the query:

    • Create a dashboard panel

    • Create an alert

    See PromQL Query Explorer for more information.

    To copy a query, click the copy icon next to the query.

    Filter PromQL Queries

    Automatic tag filtering identifies common tags in the given examples. You can use the following to filter queries:

    • Visual label filtering: Simply click the desired color-coded label to filter queries based on tags.

    • Text search: Use the Text Search bar on the top-left navigation pane.

    • Label search: Use the Label drop-down list on the top-left navigation pane.

    • Filter using categories: Use the All Categories checkboxes.