louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
60.6k stars 5.42k forks source link

Configure monitors using config file (like Heartbeat) #1354

Open mchudinov opened 2 years ago

mchudinov commented 2 years ago

⚠️ Please verify that this feature request has NOT been suggested before.

🏷️ Feature Request Type

Other

🔖 Feature description

An ability to configure monitors using configuration JSON/XML/YAML/INI/whatever file, like Heartbeat does.

Heartbeat monitor config example:

heartbeat.monitors:
- type: icmp
  id: ping-myhost
  name: My Host Ping
  hosts: ["myhost"]
  schedule: '*/5 * * * * * *'
- type: tcp
  id: myhost-tcp-echo
  name: My Host TCP Echo
  hosts: ["myhost:777"]  # default TCP Echo Protocol
  check.send: "Check"
  check.receive: "Check"
  schedule: '@every 5s'
- type: http
  id: service-status
  name: Service Status
  service.name: my-apm-service-name
  hosts: ["http://localhost:80/service/status"]
  check.response.status: [200]
  schedule: '@every 5s'

✔️ Solution

The configuration file is injected into Docker image while uptime-kuma starts and is immediately taken into action by uptime-kuma. Such a config file can be programmatically created and automatically deployed as part of a script. Then uptime-kuma can be used for uptime monitoring of complex automated deployments like for example GitLab with all its parts.

❓ Alternatives

No response

📝 Additional Context

No response

jananathbanuka commented 2 years ago

Any update on this?

BercziSandor commented 2 years ago

+1

fgajic commented 2 years ago

+1

unnisathyarajan commented 2 years ago

+1

s1ashz commented 1 year ago

this would be great

SUngarov commented 1 year ago

+1 please

harryvince commented 1 year ago

+1

guillaumemeyer commented 1 year ago

Without this feature, how do you deploy this tool from one environment to another (from UAT > INTEGRATION > PRODUCTION)?

dorkamotorka commented 1 year ago

+1

Sam-bernier commented 1 year ago

+1

tofran commented 1 year ago

+1

Please refrain from making such comments. There are plenty of people subscribed to threads and this kind of comment just spams their inbox. Only comment if you have something to add to the discussion. If you wish to upvote the idea, issue or existing comment use the appropriate emoji reaction. Thank you.

Sam-bernier commented 1 year ago

ah thank you for the educational message meant to change the way everyone uses github. Maybe you should start a blog to express your opinion to reach more than the few subscribed here or to have an actual point in life rather than being a karen. This is a very important concept, being able to launch from flat files, and the fact it is not in the project is sad and I think that anyone who is on this thread who is not a troll will want this point to get noticed and applied. I understand that it is getting closed and ignored, but it should not.

Thanks for nothing

tofran commented 1 year ago

If this is so "important” feel free to contribute with valuable help. This might even include making a PR to the fork, helping the original author. Thank you.

Sam-bernier commented 1 year ago

Ok, tofran, thanks for your response. I did consider doing what you said, however, after having upvoted this and then looked deeper to see what would be needed, i found the other duplicates of this, including #3578 where louislam says "It is not not worth to spend time on it, so please don't make this pr."

tofran commented 1 year ago

Okay this is actually a pretty relevant point. This project definitely needs help with maintenance. Has anyone else considered a hard fork for this repo? With focus on production use?

Sam-bernier commented 1 year ago

what I ended up doing to allow my clients to update via a file is to create a python script that gets the routes and methods from excel with a route and method column they can edit and maintain, uses uptime_kuma_api, and simply does a comparison to add/edit/delete routes. It does require the adding of some environmental variables on setup, but once going, with a simple cron job all they gotta do is edit that file and kuma gets synced. Not quite as simple as a flat file config on startup, but it does the job and takes only a few minutes of tinkering for me to be able to pass onto less technical users, and it keeps up to date, so I am satisfied. Not all nails need a hammer... whatever that means lol...

simo222 commented 3 months ago

Gatus supports this https://github.com/TwiN/gatus