AutoKuma icon indicating copy to clipboard operation
AutoKuma copied to clipboard

notification_names doesnt work from snippet in config file

Open chicaneau opened this issue 11 months ago • 1 comments

I'm on the master branch for reference. Using docker.

i have this snippet below and everything is working great besides the notification wont enable. I'm pretty sure my syntax is all correct. I tried forcing it to use notificationIDList but i dont think this is supported in snippets (maybe only json static mappers?)

My telegrambot notification does create in Uptime Kuma, but it just wont enable on these monitors. I even deleted a monitor and let it recreate but it doesnt enable.

I'm pretty sure my syntax for notification_names is correct. I've scoured the issues for someone with a similar problem and i cant see anything. Would love any suggestions.

[snippets]
web = '''
    {{ container_name }}_http.http.name: {{ container_name }}
    {{ container_name }}_http.http.url: http://{{ args[0] }}:{{ args[1] }}
    {{ container_name }}_http.http.accepted_statuscodes: ["200-299","403"]
    {{ container_name }}_http.http.tag_names: [ {"name": "httptag"} ]
    {{ container_name }}_http.http.notification_names: ["telegrambot"]
    {{ container_name }}_docker.docker.name: {{ container_name }}_docker
    {{ container_name }}_docker.docker.docker_container: {{ container_name }}
    {{ container_name }}_docker.docker.docker_host: {{ 2 }}
    {{ container_name }}_docker.docker.tag_names: [ {"name": "dockertag"} ]
    '''

telegrambot.json

{
    "type": "notification",
    "active": true,
    "isDefault": false,
    "name": "Telegram Notification",
    "config": {
        "telegramBotToken": "redacted token",
        "telegramChatID": "redacted chat id",
        "type": "telegram"
    }
}

chicaneau avatar Feb 12 '25 12:02 chicaneau

how did you fix this?

robflate avatar Mar 28 '25 11:03 robflate

Sorry the documentation here was wrong, the correct property name is notification_name_list

BigBoot avatar Nov 12 '25 17:11 BigBoot