Skip to main content

3.1.2 Testing the Prometheus Scrape


Assume for a moment you made a typo in the yml file, or some other problem occurs and your new scrape isn't showing in can you see what is going on?


Thankfully there is a service running that allows you to see the status of all Prometheus scrapes, and will usually give you an idea about what is going on.  We can check a web page to get this detailed information.


The webpage/port in question though is NOT open by default to external systems and we must access it in a special way.  If the port were open, we would normally just go to https://my.server.address:21090/targets.  But, to work around the port not being opened, we can do the following (from terminal, macOS):

ssh -L 8000:localhost:21090 user@my.server.address

Alternatively, if you are on a Windows device, you can do the same thing through Putty by configuring a "tunnel" with local port of your choosing redirecting to the FileWave server:

These configurations redirects our requested traffic back to port 8000 on our local device, based on the ssh connection being established.  The result is that in our own browser then, we can go to http://localhost:8000/targets to see the scrape data.

See below how I have a mistake in one of my jobs (query 153 doesn't actually exist):