I am trying to use variables in "startsAt":  and  "endsAt ",  but I get 
the error parsing.
  Moreover, if I substitute the output of variables, there are no errors.
$mydate1=` date -u +"%Y-%m-%dT%H:%M:%SZ" `  
$mydate2=` date -u +"%Y-%m-%dT%H:%M:%SZ" --date '4 hours' `  

Example:
curl http://localhost:9093/api/v1/silences -d '{ 
      "matchers": [ 
        { 
          "name": "instance", 
          "value": "host1:9100", 
          "isRegex": true 
        } 
      ], 
      "startsAt": "$mydate1", 
      "endsAt": "$mydate2", 
      "createdBy": "api", 
     "comment": "Silence", 
      "status": { 
        "state": "active" 
      } 
}' 

-- 
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/5f2cc1b8-3bcf-4dae-8c39-6259e55fd597n%40googlegroups.com.

Reply via email to