On Saturday, 4 April 2020 10:43:27 UTC+1, Belmark Caday wrote:
>
> Here are the udpdated tests : 
>
>  - series: 'node_filesystem_free{fstype="ext4"}'
>    values: '1+0x120'
>
>  - expr: 'predict_linear(node_filesystem_free{fstype!~"tmpfs"}[1h], 4 * 
> 3600) > 0'                                                                  
>                                                                   
>    eval_time: 1m                                                          
>                                                                             
>                                                                 
>    exp_samples:                                                            
>                                                                             
>                                                                 
>      - labels: 'node_filesystem_free{fstype="ext4"}'                      
>                                                                             
>                                                                     
>        value: 1          
>
> And here is the error message I get: 
>
>   FAILED:
>     expr: "predict_linear(node_filesystem_free{fstype!~\"tmpfs\"}[1h], 4 * 
> 3600) > 0", time: 1m0s,
>         exp:"{__name__=\"node_filesystem_free\", fstype=\"ext4\"} 1E+00"
>         got:"{fstype=\"ext4\"} 1E+00"
>
>
Good: the error message tells you exactly what the problem is.  You said 
the expected result is

node_filesystem_free{fstype="ext4"} 1

but the actual result was

{fstype="ext4"} 1

That is correct: the output of the predict_linear() function is a 
timeseries with no metric name.

If you go to the prometheus GUI (normally on port 9090) and try these two 
promQL expressions, you'll see the difference:

node_filesystem_free_bytes{fstype!~"tmpfs"}

predict_linear(node_filesystem_free_bytes{fstype!~"tmpfs"}[1h], 4 * 3600)

HTH,

Brian.

-- 
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/8e31d56a-69ef-4b88-856e-a973937a4b4b%40googlegroups.com.

Reply via email to