To scrape any endpoint that is running prometheus.
Adding/removing endopints in the configuration tab adds or removes them from the database. These changes are not reflected in the kubernetes tab currently.
Currently Docketeer's prometheus only scrapes an instance of prometheus running in a kubernetes cluster if it is port forwarded to 'http://localhost:45555' with the endpoint '/federate'
Adding/removing endpoints in the configurations tab adds or removes them from the database and builds config files and causes prometheus to reload with the new config file.
- POST /api/prometheus/config
- Will insert data into 'datasources' table in postgres.
- Will create a prom_${id}.yml file in the imageConfig/prometheus folder
- Will write the path to this file in the 'datasources' table
- Will merge all prom_${id}.yml files and basePrometheus.yml into master 'prometheus.yml'
- Sends POST request to 'http://prometheus:9090/-/reload' which causes prometheus to reload and pull from the new 'prometheus.yml' file
- DELETE /api/prometheus/config
- Will remove 'datasources' entry in postgres
- Will delete prom_${id}.yml file in imageConfig/prometheus folder
- Will rebuild master 'prometheus.yml'
-
The config files that are built are not formatted correctly with multiple matches '{job="kubernetes-apiservers"},{job="kubernetes-nodes"}' for instance would format the first match correctly
- {job="kubernetes-apiservers"} - {job="kubernetes-nodes"} <--- second match is too far to the left
-
If there is an error in one of the config files, reloading with the 'http://prometheus:9090/-/reload' will error without feedback. Any future builds will be wrong because of this unless the erroneus .yml file is removed
- Fix builder so that the file formatting is correct
- Handle errors for when the 'http://prometheus:9090/-/reload' POST request throws an error. Remove the erroneus file and rebuild the master 'prometheus.yml' file.
- Work with the prometheus API to give users suggestions into the types of matches available at the endpoint provided.
- Get 'update' functionality working