grafana

Grafana展示AlertManager告警

我与影子孤独终老i 提交于 2019-12-11 13:30:21
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 1 安装camptocamp-prometheus-alertmanager-datasource插件 grafana-cli plugins install camptocamp-prometheus-alertmanager-datasource sudo systemctl restart grafana-server 2 添加数据源 3 添加模板 选择 import 输入8010 选择数据源 上面定义的名字 4 修改成自己想要的格式 示例: 来源: oschina 链接: https://my.oschina.net/54188zz/blog/3141699

How can I create an SLA chart in Grafana?

痴心易碎 提交于 2019-12-11 13:06:37
问题 I have a seriesMetric , and a constantLine (the goal/SLA). I want to be able to "count" the occurances below the line, and divide by the total to get a % within SLA. I know how to do the 2nd part, using asPercent , but I can't figure out how to count the occurrences below the line in Grafana. There's no countif function. I tried currentBelow and averageBelow , but then nothing appeared on my chart (the two lines disappeared). I assume I did something wrong. I think this is a pretty common use

how to install latest version of prometheus/promtool in ubuntu?

被刻印的时光 ゝ 提交于 2019-12-11 11:32:56
问题 I downloaded my prometheus version is 2.3.2 wget https://github.com/prometheus/prometheus/releases/download/v2.3.2/prometheus-2.3.2.linux-amd64.tar.gz untared and prometheus already running as service. I want to verify my Prometheus alert manager rule using promtool. created one rule from below blog. https://petargitnik.github.io/blog/2018/01/04/how-to-write-rules-for-prometheus when I run the promtool check rules /etc/prometheus/prometheus.rules.yml it says, Promtheus not installed, so

How can I place home dashboard as the top in list of dashboards in Grafana?

做~自己de王妃 提交于 2019-12-11 10:46:41
问题 I want to place the home dashboard at the top when the user clicks on the dashboard expandable list. I have a dashboard that is set as my home and called as "Home" but while navigating, it is a bad UX to see it at the bottom of the list. To explain with pictures: The following two pictures depict what I currently have: This is what I want: I tried looking into multiple options of placing dashboards at the top: starred, etc but none seemed relevant. I tried to compare what is the difference

I want to set Alert for grafana graph after every four hours on Slack

筅森魡賤 提交于 2019-12-11 09:48:51
问题 I want slack notification of grafana graph after every four or six hours. But I am not able to see any option for that. Can you please help me regarding this. Advance Thank You. 回答1: I recommend that just copy URL from your slack -> Incoming-webhook, then paste it on Slack Settings , for the first time, just fill url option and try Send Test . Uncheck Send on all alerts and Include image and test it again. 回答2: Just mention send reminder every to value at what time period you want

How to get more than one graph of samplers (which i have in my jmeter) in a graph of grafana using templating

青春壹個敷衍的年華 提交于 2019-12-11 05:59:11
问题 Im trying to get throughput/sec of each samples (i have in my jmeter test ) in grafana dashboard using influxdb . I'm using templating to configure .screenshot showing template settings My query is-- SELECT count("responsecode") FROM "samples" WHERE "label" =~ /$label/ AND "status" =~ /$status$/ AND $timeFilter GROUP BY time($interval) My intention is to get drop down option to select graph or response of one or more samplers in a graph of grafana dashboard . When i select more than one

Change Grafana's headers (Access-Control-Allow-Origin)

六眼飞鱼酱① 提交于 2019-12-11 05:47:07
问题 I'm trying to display a Grafana dashboard within a plain PHP page. I followed the website instructions to authentiate with oauth. Here is my code: <?php $ch = curl_init(); $authorization = "Authorization: Bearer <myToken>"; curl_setopt_array( $ch, array( CURLOPT_URL => 'url-to-my-dashboard', CURLOPT_HTTPHEADER => array('Content-Type: application/json' , $authorization), CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPAUTH => "HTTP/1.1" )); $output = curl_exec($ch); ?> <html> <head> <meta http

How to set alias for Grafana Query with Prometheus Input

拟墨画扇 提交于 2019-12-11 04:55:34
问题 I am currently facing an issue with Grafana/Prometheus. I've got a panel and I am trying to add different queries to it. To be able to configure thresholds I should give every query a unique alias but I really don't know how to do that. Could anybody provide an example to me? Thanks in advance. 回答1: See this link http://docs.grafana.org/features/datasources/prometheus/#templated-queries To use Template Query is help for you. First, you should define label_values with metric or not. and,

How to use Prometheus to store Data to be visualized by Grafana

感情迁移 提交于 2019-12-11 03:15:27
问题 With the help of Python request.get and json.loads functions, I was able to source the data from an URL. The data contain a list of instances where each one of them have metrics such as instance_id, status, etc. My question is that is there any way I could upload those metrics to Prometheus? I looked into the pushgateway function but was not sure if that is the correct way of doing data pushing and storage. My current effort to push data to Prometheus is the following: from prometheus_client

Auto login to grafana from Web application using credentials or token

纵然是瞬间 提交于 2019-12-11 01:55:10
问题 I have web application and from that web application I want to open grafana dashboard into an iframe. But I want to auto login to grafana and show the dashboard. So i will achieve it using credentials or authorization header if possible. Is there any other way to do this. 回答1: I'm working on something similar at the moment. Implementing a clean solution is being discussed in the following Github issue: https://github.com/grafana/grafana/issues/3752, which does suggest some workarounds. 回答2: I