Change rules datasource


I have installed prometheus and grafana through helm chart of kube-prometheus-stuck and im adding all the alerting rules in values.yml file

My rule for example looks like this:

- name: my_group
- alert: TargetMissing
expr: up == 0
for: 1m
severity: critical
description: ‘(instance {{ $labels.instance }}) has been down for more than 1 minutes.’
summary: ‘Instance {{ $labels.instance }} down’

The problem is in my grafana ui all the rules are registered under “mirmir/cortex/loki” and not under “Grafana” and i only have prometheus datasource that is under the Grafana -

All the rules that is not under Grafana does not send any slack notifications, because i dont have any loki cortex or mirmir datasource…
is there a way to set from yaml the roles to register under the grafana?

Or is my only option is to setup loki?
I want my yaml rules to be registered under grafana and havent find a way, im now looking into how to install loki to my system though a loki chart but there is not really a lot of docs :frowning:
Please help

Grafana has its own alerting system that is totally separate to Prometheus. If you are wanting to use the Promethues alerting stack (which is what your posting suggests) you wouldn’t see anything in the Grafana UI. You also need to ensure that your alertmanager configuration is correct for any integrations (such as Slack) as well as the routing configuration.

Loki is a tool for storing logs, so isn’t relivant for Prometheus alerting.

I do see the rules im creating in the grafana ui, but they are under alerting that has the title loki/cortex/mirmir

I have created a role by myself there under grafana titel and notification works fine
Im just saying that creating rouls from the yaml file as i posted an example, it creates the rule not under grafana title and so the notifications doesnt work only if the rule is from the yaml

How can i create the role from the yaml under the grafana title?