File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,16 +126,16 @@ fn prometheus_labels() -> Labels {
126126///
127127/// see also <https://github.com/prometheus-community/helm-charts/blob/prometheus-27.32.0/charts/prometheus/values.yaml#L983-L1036>
128128fn prometheus_annotations ( product_version : & str ) -> Annotations {
129- let port = if product_version. starts_with ( "1." ) {
130- METRICS_PORT
129+ let ( path , port, scheme ) = if product_version. starts_with ( "1." ) {
130+ ( "/metrics" , METRICS_PORT , "http" )
131131 } else {
132- HTTPS_PORT
132+ ( "/nifi-api/flow/metrics/prometheus" , HTTPS_PORT , "https" )
133133 } ;
134134
135135 Annotations :: try_from ( [
136- ( "prometheus.io/path" . to_owned ( ) , "/metrics" . to_owned ( ) ) ,
136+ ( "prometheus.io/path" . to_owned ( ) , path . to_owned ( ) ) ,
137137 ( "prometheus.io/port" . to_owned ( ) , port. to_string ( ) ) ,
138- ( "prometheus.io/scheme" . to_owned ( ) , "http" . to_owned ( ) ) ,
138+ ( "prometheus.io/scheme" . to_owned ( ) , scheme . to_owned ( ) ) ,
139139 ( "prometheus.io/scrape" . to_owned ( ) , "true" . to_owned ( ) ) ,
140140 ] )
141141 . expect ( "should be valid annotations" )
You can’t perform that action at this time.
0 commit comments