Prometheus authentication and examples for curl

0
Hi. We run Mendix on a private cloud and I want to understand what metrics we can have out of the box. I read https://docs.mendix.com/developerportal/deploy/private-cloud-monitor/ . It tells me to install Prometheus, Helm, Grafana etc., but I want to be sure it will be able to connect. So I tried first to open the /metrics page: # TYPE commons_pool2_mean_active_seconds gauge # HELP commons_pool2_mean_active_seconds The mean time objects are active commons_pool2_mean_active_seconds{factoryType="org.apache.commons.dbcp2.PoolableConnectionFactory<org.apache.commons.dbcp2.PoolableConnection>",name="pool",type="GenericObjectPool"} 0.002 # TYPE mx_runtime_stats_connectionbus_selects counter # HELP mx_runtime_stats_connectionbus_selects mx_runtime_stats_connectionbus_selects_total{XASId="ba3432f5-eeec-4d58-8033-6a9734d7c8cd"} 351031.0 # TYPE process_cpu_usage gauge # HELP... so far so good, now I want to try some Prometheus examples from https://prometheus.io/docs/prometheus/latest/querying/api/, but they don't work: $ curl -H 'Accept: application/json' 'http://myapp/metrics/api/v1/query?query=up&time=2015-07-01T20:10:51.781Z' {"result":-2,"message":"Use content type 'application/json' for requests to this application."} $ curl -H 'Accept: application/json' -H "Content-Type: application/json" 'http://myapp/metrics/api/v1/query?query=up&time=2015-07-01T20:10:51.781Z' {"result":-3,"message":"Use HTTP POST method for requests to this application."} $ curl -H 'Accept: application/json' -H "Content-Type: application/json" 'http://myapp/metrics/api/v1/query?query=up&time=2015-07-01T20:10:51.781Z' --data '' {"result":-4,"message":"Authentication failed."} What authentication is needed? I tried "Basic" with my MxAdmin user and password, but it has same error.
asked
0 answers