Adding additional Prometheus exporter to PMM

  1. Hi

    I want to add another prometheus exporter to PMM so that I can track another service, in my case apache on ubuntu

    I have followed a blog post that explained how to do it but I cant get it to add apache as an external service, these are the steps I followed

    Install apache exporter on client server

  2. Make it into a service
  3. The exporter by default delivers stats on the following URL: http://ip:9117/metrics
  4. run a pmm-admin add command to add it

I have tried the following without success

sudo pmm-admin add external:service apache --service-port 9117 <server_name> (that command doesnt run)
sudo pmm-admin add external --listen-port=9117 (this command run and added something but its not right)

can someone please help how do I add another prometheus exporter so that its being consumed by PMM

Hi, please have a look at the following: and try specifying --service-name.

Hi Andrew,

Could you try the next command?

pmm-admin add external --listen-port=9117 --metrics-path=metrics


Thanks both of you for the help, I have tried both of your suggestions and this is the outcome

I ran the following command

pmm-admin add external --listen-port=9117 --metrics-path=metrics --service-name=apache

With the following output checking the exporters on the machine

I am getting an Unknown status on the external exporter. Checking the service running I get the following

In PMM in the Prometheus Exporters Overview dashboard it shows the exporter


But I am now not sure if this is actually working and where would I try and search for some of the stats?

Thanks for your help in advance

BTW @igroene - the help on CLI does not give me the --service-name as an option, could be a version issue or its not been updated properly?


New metrics can be checked on Prometheus UI (http:///prometheus)

You may use the next query



The flag “–service-name” is shown if help command is requested for “add external” command

Hi @adivinho

Thank you for your help that is exactly what I was after, I am able to see these new stats in Prometheus console and view them on a graph.

According to the prometheus apache exporter though there is a Grafana dashboard I can add

Apache dashboard for Grafana

Do you know if this will work with PMM and the new external exporter?


I just tried adding it to PMM and it doesnt pick up any of the hosts? Any ideas on how we can fix this? Would be great to use that dashboard, or can I create a dashboard myself or can I only use the Prometheus console to see these stats?

Just an FYI - I edited that dashboard with the query you mentioned above


And now all the graphs are working, I just need to work out why its not pulling out the host name and then I think we have a working dashboard
For arguments sake if you edit the apache scorecard dashboard and change the query as follows


It now works

(This is more for anyone else’s sake if they come onto this while searching)


Again for anyone that is interested I have resolved the grafana dashboard allowing more than 1 node to be monitored using the apache exporter.

First thing I did was edit the Host variable and pulled out the node name

I then edited the graph queries to include this new variable so that the would all switch when changing the node I am looking at


What you will notice is that I changed the service name to be a regex (=~) this allows me to add the service to each node I am monitoring and give them all a unique name like apache-hostname1 and then finally added the host variable to the query too so that each graph switches when I updated the variable on the dashboard

Hope this helps someone else out there trying to add Prometheus Apache Exporter to their PMM instance.

Thank you Andrew.

IMHO service_name can be removed from formulas. Hardly it will be used more than one apache exporter on the same node.