Version of Grafana : v9.0.0
Hi, I’m trying to add a prometheus alert manager instance into Grafana as a datasource. If I perform this from the UI, it works.
So, I now try to add this in the datasource.yaml which is mounted into my Grafana container as a configmap.
/etc/grafana/provisioning/datasources $ cat datasources.yaml
apiVersion: 1
datasources:
- isDefault: true
name: Prometheus
type: prometheus
url: http://prometheus-operated:9090
- name: Alertmanager
access: proxy
implementation: prometheus
type: alertmanager
url: http://alertmanager-operated:9093
Note - I had to define the implementation type as prometheus as the default is to use Cortex.
Now, having loaded this, when I check in the UI, I receive this message.
For some reason, implementation is ignored, yet even changing this manually to Prometheus still results in the same error.
I’m hoping there is something obvious to this but I can’t find anything obvious.
1 Like
I have the same problem. Did you manage to solve that?
Hi @afraser502 ,
Welcome to the community support forums !!
Please review the submission template and include more details (some info you already provided):
What Grafana version and what operating system are you using?
What is your datasource?
What are you trying to achieve?
How are you trying to achieve it?
What happened?
What did you expect to happen?
Can you copy/paste the configuration(s) that you are having problems with?
Did you receive any errors in the Grafana UI or in related logs (/var/log/grafana/grafana.log
)? If so, please tell us exactly what they were.
Did you follow any online instructions? If so, what is the URL?
prontog
September 7, 2022, 1:00pm
4
Hello,
I had the same problem. You cannot edit the datasource using the UI because it is provisioned. The implementation
has to be under the jsonData
field (see the " JSON Data" section at the Provision Grafana article).
- name: Alertmanager
access: proxy
type: alertmanager
url: http://alertmanager-operated:9093
jsonData:
implementation: prometheus
1 Like
@prontog - that did the trick. Many thanks for taking the time to feedback. On reading it again, it makes sense but totally missed the jsonData section for adding.
Anyway, this solved my issue. Thanks.
1 Like
dsut
October 18, 2022, 8:19pm
6
sadly jsonData section has no mention of ‘implementation’ being a possibility for alertmanager… this is the only place i found the answer. many thanks @prontog