I am using Prometheus : 2.8.1
prometheus config:
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9090']
- job_name: 'grafana'
static_configs:
- targets: ['localhost:3000']
- job_name: 'TestApp'
metrics_path: '/actuator/prometheus'
static_configs:
- targets: ['localhost:8080']
# HELP jvm_buffer_memory_used_bytes An estimate of the memory that the Java virtual machine is using for this buffer pool
# TYPE jvm_buffer_memory_used_bytes gauge
jvm_buffer_memory_used_bytes{id="mapped",} 0.0
jvm_buffer_memory_used_bytes{id="direct",} 81920.0
# HELP hikaricp_connections Total connections
# TYPE hikaricp_connections gauge
hikaricp_connections{pool="HikariPool-1",} 10.0
# HELP cache_size The number of entries in this cache. This may be an approximation, depending on the type of cache.
# TYPE cache_size gauge
cache_size{cache="addressTypesCache",cacheManager="cachceManager",name="addressTypesCache",} 0.0
cache_size{cache="feeTypesCache",cacheManager="cachceManager",name="feeTypesCache",} 0.0
But when prometheus tries to scrape it, it gives below error:
| "INVALID" is not a valid start token |
Its not clear from the logs or from this error as to whats wrong and how to fix it.
The spring boot app has security enabled & is protected by username and password.
I tried prometheus with few other versions and specifying basic auth in config but that dint work either.
Can someone please help me understand what could be missing here?
--
Thanks,
Tasleem