Ad Widget

Collapse

Write preprocessing item and item prototype from prometheus exporter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bab
    Senior Member
    • Aug 2020
    • 176

    #1

    Write preprocessing item and item prototype from prometheus exporter


    This is my pattern that is showing in prometheus exporter:

    baas_retail_Samat_service_total{exception=" is not available due to the reason : Message ID: 4241791, This is for test ",} 1.0

    Also I wrote follow preprocessing pattern :

    baas_retail_Samat_service_total{exception=" is not available due to the reason : Message ID: ~.*,~.*"}​


    Also I have attached LLD macros and item prototype and follow is preprocessing in itme_prototype :

    {#METRIC}{Message="{#MESSAGE}"}


    This does not work and I am not sure what is the issue ?
    Attached Files
  • bab
    Senior Member
    • Aug 2020
    • 176

    #2
    Would you please help me about it ?

    Comment

    • bab
      Senior Member
      • Aug 2020
      • 176

      #3
      When I have follow pattern
      jvm_gc_pause_seconds_sum{action="end of minor GC",cause="Metadata GC Threshold",} 0.071

      it is working with follow preprocessing parameters in prometheus to JSON

      jvm_gc_pause_seconds_sum{action="end of minor GC",cause=~".*"}


      but when I have this pattern

      baas_retail_Sam_service_total{exception=" is not available due to the reason : Message ID: 4241791, This is for test ",} 1.0

      follow preprocessing parameters does not work

      baas_retail_Sam_service_total{exception=" is not available due to the reason : Message ID: ~.*,~.*"}

      What is the issue ?​

      Comment

      • bab
        Senior Member
        • Aug 2020
        • 176

        #4
        part of my issue solved with change preprocessing to : baas_retail_Samat_service_total{exception=~".*is not available due to the reason : Message ID:.*"}


        but it is showing follow error for that discovery rule

        Cannot create item: invalid value for preprocessing step #1: invalid pattern: {#METRIC}{Message="{#MESSAGE}"}.

        Also my item prororype name : samat {#EXCEPTION} , key : SEPAM[{#NAME}.{#EXCEPTION}]
        Also preprocessing for prometheus pattern is {#METRIC}{Message="{#MESSAGE}"}

        Comment

        Working...