I have done the changes as suggested and it worked. Thanks a lot for your 
help. Below is the format we are receiving the alert now.

*Labels*
alertname = InstanceDown
customer = APIGEE
instance = 10.2.0.85
job = apigeenode
severity = critical
*Annotations*
description = 10.2.0.85 of job apigeenode has been down for more than 1 
minutes.
summary = Endpoint 10.2.0.85 down

On Monday, June 15, 2020 at 6:05:24 PM UTC+5:30, Sadhana Kumari wrote:
>
> Thanks Brian,I will try the below suggested one and update you.
>
> On Sunday, June 14, 2020 at 2:03:11 AM UTC+5:30, Brian Candler wrote:
>>
>> See  https://www.robustperception.io/controlling-the-instance-label
>> - you can set the instance label separately from the __address__ that is 
>> scraped
>>
>> - job_name: 'apigeenode'
>>   static_configs:
>>     - targets:
>>       - 10.2.0.85 <http://10.2.3.17:8080/10.2.0.85>
>>       - 10.2.0.86 <http://10.2.3.17:8080/10.2.0.86>
>>       - ...
>>
>>   relabel_configs:
>>     - source_labels: [__address__]
>>       target_label: instance
>>     - source_labels: [__address__]
>>       target_label: __param_target
>>       replacement: http://10.2.3.17:8080/$1
>>     - target_label: __address__
>>       replacement: 10.2.3.17:8080
>> With the above, the instance label will be "10.2.0.85" for example.
>> I don't really understand why both the address and param_target are being 
>> set to 10.2.3.17:8080.  It looks like maybe you want to set 
>> __metric_path__ instead.  But if it works, it works.
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/798d472e-2dd7-49f8-8f6a-9bc58b8b3d2do%40googlegroups.com.

Reply via email to