Why aren't all GCP metrics available for alerts or dashboard elements in Stackdriver? - kubernetes

I cannot seem to figure out how to get certain metrics from GCP into Stackdriver (google monitoring) in a usable way. They can be viewed using Stackdriver's "Metrics Explorer" tool, but not saved into a graph or alerting policy. As a specific example, only a handful of the metrics outlined in this table are available:
https://cloud.google.com/monitoring/api/metrics_gcp#gcp-container
Again, I can use the "Metrics Explorer" tool to immediately visualize any one of them in an ad-hoc graph, but I cannot create an alerting policy or any sort of persistent monitoring for anything except for CPU Usage, Disk Usage, Page Faults, and Used Memory. Does anyone know how to get one of these metrics (such as container/cpu/usage_time) into an alerting policy?

Metrics Explorer includes access to more metrics than are currently available for alerting. We're working on addressing this both for UIs and APIs. Please stay tuned to release notes.
Thanks for using Stackdriver!

You can create a dashboard and add those metrics that you want to view. To do so please follow the instructions below. Further information on dashboards and on creating charts and alerts can be found in this documentation link.
At the Google Cloud Platform click on Products & Services which is the icon with the four bars at the top left hand corner.
On the menu go to the Stackdriver section and click on Monitoring.
A new ‘Stackdriver Monitoring’ window for your project will open up.
At the left-side navigation list click on Dashboards and select Create Dashboard. During this step you also have the option to add a chart to an existing dashboard by clicking on its name.
Give a name to the dashboard you’re creating.
At the right-hand side you can see different options to customize. Click on ‘Add Chart’ and fill in the requested information:
Give a name to the chart you’re creating.
Resource Type: Choose your resource type, e.g ‘GCE VM Instance’.
Metric: Choose the metrics that you want to add, e.g ‘compute.googleapis.com/instance/uptime ‘. Metric information for each product can be found in this documentation link.
Fill in all other information as needed: Filter, ‘Group By’, etc.
You can add more metrics by clicking the ‘Add Metric’ button.
Once you have finished click on the ‘Save’ button to save and create this new chart.
At the left-hand menu list click Dashboard and select the dashboard you have created to view it.

Related

How to sort alerts from Prometheus correctly in the Grafana panel

We have several alerts from Prometheus, we would like to visualize them in tables on the Grafana dashboard in the alert list. We would like to sort the alerts by severity and later by environment.
So the severities are:
critical
warning
info
none
My question is simply how do we sort them in the Grafana dashboard, because alphabetically it doesn't make sense.
Our Grafana version is 8.4.7, the Grafana configuration file grafana.ini is updated for the appropriate version. As a datasource we have a Prometheus.
In Grafana, I set the Alert list as a suggestion, then specified grouping by severity and focused on sorting by importance for built-in support.
enter image description here
Please how best to fill in the label for the alert instance, so that the alerts are sorted by severity and environment ?
enter image description here
On higher environments it works according to this sorting, but on LAB where we have other environments like ALFA, BETA.... Is it necessary to change the Json ? On the higher environment we use in Alert instance label this {environment~=“.*$env.*“} .
enter image description here

Choosing CloudWatch log group dynamically

I have a test Grafana setup pointing to my AWS CloudWatch service and CloudWatch logs. I can setup a graph pointing to a specific log group or groups, but what I want is to be able to dynamically set the logs groups, e.g., aws/containerinsights/$cluster/application. But I can't see how to do that or whether its even possible. The log group selection appears to be only from a dropdown and can't be edited. Is this possible? If it's not, I don't see how you can create a dashboard that can be used across clusters.
Usually, what looks like a dropdown (for example also dashboard variable) in the Grafana also takes user input - you can write/paste own text there. So write desired string with dashboard variable manually and then use offered Create: ... option:

Grafana Panel Plugin Load data on demand (click event)

I am working on a customized panel plugin where I need to show data and provide a drill down functionality. My environment would be
React Panel
Grafana 6.5.3
InfluxDb as datasource
What I want to achieve is
Initial set of data will be loaded from influx query (That part is pretty much clear how to do).
The customized panel have some clickable items and on click I need to load additional data (based on selection), I am not sure how this part can be achieved and what is best way to communicate with data source (influxDb in my case) from panel plugin. I see eventBus 1, perhaps this is the way to communicate with outer world, but couldn’t find any significant help from documentation.
Any sort of help/pointer is appreciated, or example opensource plugin which is already doing such stuff.

Grafana adds additional dashboards which I don't want

Please see picture,
I didn't add Grafana, Grafana metrics, Graphite Carbon metrics... I don't know where these dashboards are defined but I need to remove them
You can go to the Manage Dashboards page, select the ones you don't want and delete them.

Clarifications on the Domo dashboard

The tool I'm using to develop a dashboard is Domo Centerview builder. The graphs are not getting loaded when I open the dashboard but it appears only after selecting the controls.
controls like check-box, radio-buttons , radio-group and drop down lists should be placed independently. It should not come under any KPI's if u place it inside any KPI's it wont take the data until some event happens in the dashboard
I assume you are talking about Domo here - which is used to build business intelligence dashboards.
Any graph you create using the analyzer goes to your overview page. You can then move the graphs/cards to the page that you want.