Hi. I want to add the dashboard link in the alert of that particular 
service. That dashboard takes the server IP and hostname as input. From the 
instance label, I want to remove the port number and pass it as input to be 
dashboard.
Configured Alert:
  - alert: OutOfDiskSpace-Crit
    expr: ((node_filesystem_size_bytes{fstype!~"nfs.*"} - 
node_filesystem_avail_bytes{fstype!~"nfs.*"}) / 
node_filesystem_size_bytes{fstype!~"nfs.*"} * 100 > 90) * on (instance) 
group_left(nodename) node_uname_info
    for: 5m
    labels:
      severity: "CRITICAL"
    annotations:
      summary: "High Disk Usage on *{{ $labels.instance }}* - *{{ 
$labels.nodename }}* on the filesystem *{{ $labels.mountpoint }}*"
      description: "Current Usage of {{ $labels.mountpoint }} = *{{ $value 
| humanize }}%*"
      dashboard: "DashbordLink?orgId=1&*var-node=*&*var-name={{ 
$labels.nodename }}*&fullscreen&panelId=174"

In the var-name variable, I am directly passing the hostname using 
*$labels.nodename 
*, I want to pass the IP(without port) in the *var-node *variable.

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/7c7721ab-4923-41cc-a605-0c5cb3eb824d%40googlegroups.com.

Reply via email to