Coder Social home page Coder Social logo

release-argus / argus Goto Github PK

View Code? Open in Web Editor NEW
282.0 282.0 11.0 12.27 MB

Argus is a lightweight monitor to notify of new software releases via Gotify/Slack/other messages and/or WebHooks.

Home Page: https://release-argus.io

License: Apache License 2.0

Shell 0.10% Dockerfile 0.06% Makefile 0.05% Go 79.71% JavaScript 0.03% HTML 0.03% TypeScript 19.69% CSS 0.33%
go golang react

argus's People

Contributors

adampetrovic avatar dependabot[bot] avatar josephkav avatar larsl-net avatar peterdavehello avatar rexapex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

argus's Issues

Github API Rate Limiting

It appears that each time Argus is restarted the Github APIs are queried. Restarting Argus several times when working on adding a new service runs into Github rate limiting pretty easily. This maybe become a moot point if #4 is implemented so service can be added dynamically thru the UI.

Maybe rather than just querying the Github API at Argus start, check the timestamp of the last check, the interval in config.yml if defined, and delay checking until it is time to do so to avoid rate limiting.

bug: Icons can overflow (too wide)

Describe the bug
The icons on the web UI are too wide in some situations. See screenshot.

To Reproduce
I use the following config

service:
  netbox-community/netbox:
    type: github
    url: netbox-community/netbox
    url_commands:
      - type: regex_submatch
        regex: v([0-9.]+)$
    regex_version: ^[0-9.]+$
    web_url: https://github.com/netbox-community/netbox/releases/tag/v{{ version }}
    icon: https://github.com/netbox-community/netbox/raw/develop/netbox/project-static/img/netbox_logo.svg
    deployed_version:
      url: https://netbox.example.io/
      regex: '[0-9a-z]+ \(v([0-9.]+)\)'
  requarks/wiki:
    type: github
    url: requarks/wiki
    url_commands:
      - type: regex_submatch
        regex: v([0-9.]+)$
    regex_version: ^[0-9.]+$
    web_url: https://github.com/requarks/wiki/releases/tag/v{{ version }}
    icon: https://raw.githubusercontent.com/requarks/wiki/main/client/static/svg/logo-wikijs-full.svg

Screenshots
Bug_Image_size

docker-compose pull argus fails

Describe the bug
Trying to docker-compose pull argus using the provided docker-compose documentation fails with

failed to register layer: ApplyLayer exit status 1 stdout: stderr: lchown /argus: invalid argument

To Reproduce
Steps to reproduce the behavior:

  1. Fill docker-compose with recommended settings
  2. Try to docker-compose pull argus

Expected behavior
argus pulls, and I am able to docker-compose up -d it.

Desktop (please complete the following information):
I am running docker 20.10.12 in a LXC container under proxmox. I have running several other docker apps (vaultwarden, uptime-kuma, dashy, paperless-ngx, filebrowser, etc.) in the same docker-compose file and all of them are working.

feat: pass version to webhook or command

I tried using {{ version }} in a webhook request or as a command parameter. Both didn't get expended.
Is it possible to pass the version in one or both of these?

Notify param Jinja templating (var expansion)

When I receive an smtp notification, the variables are not being expanded. It works in Discord and Gotify. Not sure if I don't have the config quite right or maybe variables are not supported for the subject line?

Global config

  MAILRISE_NOTIFICATION:
    type: smtp
    url_fields:
      host: 192.168.1.104
      port: "8025"
    params:
      auth: None
      fromaddress: [email protected]
      fromname: Argus
      subject: '{{ service_id }} - {{ version }} released.'
      toaddresses: [email protected]
      usehtml: "no"
      usestarttls: "no"

Image of email
image

feat: Support for Telegram

Is your feature request related to a problem? Please describe.
I don't use Slack or Gotify.

Describe the solution you'd like
I'd like to be able to specify an arbitrary set of Telegram bot API credentials, as well as an arbitrary chat ID. Messages should arrive at that chat.

Describe alternatives you've considered
I tried looking for a Tekegram plugin for Gotify, but was unsuccessful.

feat: Update all Services that share identical WebHook(s)

You may have Service X and Service Y that send the same WebHook(s). If X and Y both have updates available and the WebHook(s) are sent for X, then if they're successful, also mark Y as updated (along with X as it would currently)

feat: command to check version validity

Like we have regex_content to require content regex to match on the page before we consider a release valid, this will add support for any command to be run to determine whether the release is valid.

e.g.

service:
  release-argus/Argus:
    type: github
    url: release-argus/Argus
    require:
      command: ["bash", "check_for_docker_upgrade", "{{ service_id }}"]

Then that script would check the current and latest sha for service_id and return status code 1 if they're the same.

Originally posted by @JosephKav in #102 (comment)

Gotify Configuration

@JosephKav I was going to wait until Shoutrr integration is implemented, but thought I would give Gotify a spin. I am not getting notifications. Am I missing something?

Global Block

settings:
  web:
    listen_host: 0.0.0.0
    listen_port: "8111"
    route_prefix: /
defaults:
  service:
    access_token: <redacted>
    interval: 30m
    deployed_version: {}
gotify:
  GOTIFY_NOTIFICATION:
    url: http://osu.gotify:8132
    token: <redacted>
    title: Argus Notification
    message: {{ service_id }} - {{ version }} released.
    extras:
      client_display: text/plain
      client_notification: '{{ web_url }}'
    priority: 5
    delay: 0s
    max_tries: 3

Service Definition

Service:
  CaddyDockerProxy:
    type: url
    url: https://github.com/lucaslorentz/caddy-docker-proxy/tags
    semantic_versioning: false
    url_commands:
      - type: regex
        regex: releases\/tag\/(v[0-9.]+)
    web_url: https://github.com/lucaslorentz/caddy-docker-proxy/releases
    icon: https://raw.githubusercontent.com/walkxhub/dashboard-icons/master/svg/caddy.svg
    gotify:
      GOTIFY_NOTIFICATION: {}
    deployed_version:
      url: http://osu.logs:8069/caddy2/current_version.txt
      regex: caddy-docker-proxy/plugin/v2\s?(v[0-9.]+)

WebUI Suggestion - Add Service Link

I know the intent of this is not to be a dashboard replacement, but I am finding I am going back and forth a lot between Argus and my app dashboard to verify updates after running webhooks. To not change the existing card view, wondering if you would you entertain making the icon a link we can define that would open up the service in a new window?

Versioning Determination Question around Beta's and pre-releases

Some apps I am monitoring have beta's and release candidates available. Grafana is an example where I am running 9.0.0-beta2 and the most recent version is 8.5.4. The first version listed on their Github release page is 8.5.4. I could add an index, but the position of the version I am running may not always be at the same index. Syncthing is another example. I am running 1.20.1, but the first version listed on their Github release page is 1.20.2-rc.3. It has additional complexity as I run the LSIO image which has its own versions and tags on Github and Docker Hub that differ slightly.

They are marked (didn't want to use the word tag) on their release page as latest, beta, and pre release, but they are a few hundred lines apart in the html code. Not sure regex is going to solve that problem. Not quite sure what to try or suggest to tackle the problem.

Here is how Syncthing looks. Not suite sure what the pre-release bubble is really called and if that is common on most repos.
Untitled

Wondering if you have any thoughts on the best way to approach it. It would be good to know what the "latest" version is as well if there are beta's or pre releases also available, maybe in the current version bubble in Argus or somethign. Thinking somehow one could define in config.xml what release cannel you wanted to be on (latest, beta, prerelease, nightly, dev, etc.). Not sure that will be easy to do with code and would be consistent enough across repos.

I have this on 3 out of 40 services in this state now, so it is a small percentage. And, in theory, those services would only be in that state for a few weeks or months until the upgrades are complete. Thought I would at least log an issue to get a few ideas.

bug: latest version not found when patch for older version exists

Describe the bug
Currently I get for rancher as the latest version the 2.5.13, although the latest version is the 2.6.4.

This is probably because the 2.5.13 was the last to be released.

To Reproduce
Use the following config

service:
  rancher/rancher:
    type: github
    url: rancher/rancher
    url_commands:
      - type: regex_submatch
        regex: v([0-9.]+)$
    web_url: https://github.com/rancher/rancher/releases/v{{ version }}
    icon: https://raw.githubusercontent.com/rancher/docs/master/static/imgs/rancher-logo-cow-blue.svg
    status:
      current_version: 2.6.3
      current_version_timestamp: "2022-04-22T20:29:51Z"
      latest_version: 2.5.13
      latest_version_timestamp: "2022-04-22T20:29:51Z"

Version not being returned for deployed service from json

Describe the bug
Trying to get the current version of sonarr and it is not being returned from the json.

To Reproduce

config.xml

  Sonarr/Sonarr:
    type: url
    url: https://github.com/Sonarr/Sonarr/tags
    url_commands:
      - type: regex_submatch
        regex: \/releases\/tag\/v?([0-9.]+)\"
    web_url: http://osu.sonarr:8079/sonarr/system/updates
    icon: https://raw.githubusercontent.com/NX211/homer-icons/master/png/sonarr.png
    deployed_version:
      url: http://local.sonarr:8079/sonarr/api/v3/system/status?apikey=<redacted>
      json: version

Sonarr json

{
  "appName": "Sonarr",
  "version": "3.0.8.1519",
  "buildTime": "2022-05-09T22:34:37Z",
  "isDebug": false,
  "isProduction": true,
  "isAdmin": false,
  "isUserInteractive": false,
  "startupPath": "/app/sonarr/bin",
  "appData": "/config",
  "osName": "Linux",
  "isMonoRuntime": true,
  "isMono": true,
  "isLinux": true,
  "isOsx": false,
  "isWindows": false,
  "mode": "console",
  "branch": "develop",
  "authentication": "none",
  "sqliteVersion": "3.36.0",
  "urlBase": "/sonarr",
  "runtimeVersion": "6.12.0.122",
  "runtimeName": "mono",
  "startTime": "2022-05-14T12:06:39.675145Z",
  "packageVersion": "3.0.8.1519-ls282",
  "packageAuthor": "[linuxserver.io](https://www.linuxserver.io/)",
  "packageUpdateMechanism": "docker"
}

Expected behavior
Current version is returned from the json

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Browser: Chrome 101.0.4951.54
  • Hymenaios Version: 0.3.2
  • Docker: 20.10.16

Additional context
I tried the regex below instead of json with no luck either. Also tried headers with key and value instead of embedding them in the URL.

regex: \s\s\"version\":\s\"([0-9.]+)\",

Positive Look Behind Question

I am getting an error using a positive look behind. It works at https://regex101.com/. I tried various escapes for the ? and <. Any ideas?

Logs

panic: regexp: Compile(`(?<=\"version\":\s\")([0-9.]+)\"`): error parsing regexp: invalid or unsupported Perl syntax: `(?<`

Regex

(?<=\"version\":\s\")([0-9.]+)\"

Web Page Suggestions

A few suggestions for the web page...

Short term

  1. ✅ Change Help link to Documentation or Docs and open in a new window. Always keep your app open and users in your app. Self promotion to some extent.
  2. ✅ Add link to Github repo and call Github or link to Github Issues and call Issues which opens in a new window
  3. ✅ Add a sponsor link so I can buy you a coffee, beer, whiskey, or whatever you poison is.

Longer term

  1. Consider a table view. I have 20 services setup currently. Guessing I may add another 10 or so. Table view would be more compact, less scrolling, and a quicker view of more services at once.
  2. Someone will probably eventually ask for a tag and filter option to view the dashboard. So maybe in the Dashboard section of the service block there is a tag option which eventually could be used as a display filter in the dashboard. Probably easier to do in the earlier stages of a project than try to retrofit in later.
  3. ✅ Someone will undoubtedly ask for authentication since it can have actions to run webhooks which leads to downtime and possibly required validation and/or testing after the update. I think for something like this basic web auth would be sufficient. I would want the ability to disable it and let my reverse proxy handle the auth to eliminate double logins. I would not head down the authorization path. Either someone gets access to the dashboard or they do not. A compromise could be with no auth you get view only access and if authenticated, then you can run the webhooks and eventually update the config once that is available via the UI.

Really impressed with the work on this. I have most things set to update automatically, but a lot of it relies on automation upstream that someone else is maintaining. Previously I would have to periodically go out and verify versions and then notify maintainers they had an issue. Some apps tell you when you login, but not all. Can see it in real time now. Also surprised how many updates some apps are pushing out each day.

Docker Tag Usage Question

Trying to implement docker tag today. Not quite sure what I am missing. It seems to find the right image and version in the Docker Hub dozzle:v.4.0.2, but does give a 404 page not found.

Logs
docker exec -it argus bash -c 'argus -test.service Dozzle'
2022/08/22 17:53:26 INFO: Testing (Dozzle),
2022/08/22 17:53:27 WARNING: Dozzle, dozzle:v.4.0.2 - 404 page not found
2022/08/22 17:53:27 WARNING: Dozzle, dozzle:v.4.0.1 - 404 page not found
2022/08/22 17:53:27 WARNING: Dozzle, dozzle:v.4.0.0 - 404 page not found
...
2022/08/22 17:53:28 ERROR: Testing (Dozzle), No version matching the conditions specified could be found for "Dozzle" at "https://github.com/amir20/dozzle"
2022/08/22 17:53:28 INFO: Testing (Dozzle), Deployed version - "4.0.1"
Config.yml
  Dozzle:
    latest_version:
      type: github
      url: amir20/dozzle
      url_commands:
        - type: regex
          regex: v([0-9.]+)$
      require:
        docker:
          type: hub
          image: dozzle
          tag: '{{ version }}'
    deployed_version:
      url: http://osu.dozzle:8888/dozzle/settings
      regex: \"version\":\s?\"v([0-9.]+)\"
    notify:
      MAILRISE_NOTIFICATION: {}
    webhook:
      WEBHOOK_DRONE_BUILD:
        url: http://192.168.1.104:9358/hooks/build_docker?container=dozzle
    dashboard:
      auto_approve: true
      icon: https://raw.githubusercontent.com/NX211/homer-icons/master/png/dozzle.png
      icon_link_to: http://osu.dozzle:8888/dozzle/
      web_url: https://github.com/amir20/dozzle/releases/releases/v{{ version }}

feat: HTTP API for `current_version`

Something like /api/v1/version that will return the version that's running.

Why

Enable Hymenaios to monitor itself for available updates, and auto-update by setting it up in deployed_version

Getting up and running / installation documentation

Hi there,

I am very interested in this project and have been trying to set up a test vm with it for awhile but i've been struggling to get it up and running with the getting started documentation and was hoping to get some assistance/ request (or even help create) better setup documentation once I understand how to get going:

what i've done so far:

downloaded latest binary Argus-0.6.0.linux-amd64

transferred binary to centos 8 vm via scp

gave the binary execute permissions via chmod

ran ./Argus-0.6.0.linux-amd64 -help

created a /home/argus/argus directory structure and moved the binary to /home/argus/argus/Argus-0.6.0.linux-amd64

created a config.yml at /home/argus/argus/config.yml

added the following to the config.yml file just for a test:

settings:
  log:
    level: INFO           # Log level, DEBUG/VERBOSE/INFO/WARNING/ERROR
    timestamps: false     # Log with timestamps
  web:
    listen_host: 172.29.2.128  # IP address to listen on
    listen_port: 8080     # Port to listen on
    route_prefix: /       # Web route prefix, e.g. /demo means http://IP:PORT/demo to access
    cert_file: ''         # HTTPS Cert path, e.g. `cert.pem`
    pkey_file: ''         # HTTPS PrivKey path, e.g. `privkey.pem`

service:
  adnanh/webhook:
    type: github
    url: adnanh/webhook
    web_url: https://github.com/adnanh/webhook/releases/{{ version }}
    regex_content: webhook-linux-amd64\.tar\.gz
    icon: https://raw.githubusercontent.com/adnanh/webhook/development/docs/logo/logo-128x128.png

created a systemd service file at /etc/systemd/system/argus.service


[Unit]
Description=Argus Server
Documentation=https://release-argus.io/docs
After=network-online.target

[Service]
User=argus
Restart=on-failure
ExecStart=/home/argus/argus \
  -config.file=/home/argus/argus/config.yml

[Install]
WantedBy=multi-user.target

I'm not sure what else, but i feel like i'm definitely missing something....
i cant hit the web ui at the boxes ip address (172.29.2.128:8080)
also tried disabling firewall and se linux so it's neither of those

feat: check for docker tag before release is considered usable

e.g.

service:
  argus:
    latest_version:
      type: github
      url: release-argus/argus
      require:
        docker:
          type: docker/quay/ghcr
          repo: argus-io/argus
          token: TOKEN
          tag: '{{ version }}' # tag style of the docker image

Then this'll check for the existance of the tag at
Docker:
https://index.docker.io/v1/repositories/releaseargus/argus/tags/{{ version }}
Quay:
curl --header 'Authorization: Bearer TOKEN' https://quay.io/api/v1/repository/argus-io/argus
map to json and see if {{ version }} is a key
GHCR:
https://api.github.com/repos/release-argus/Argus/tags

Originally posted by @JosephKav in #102 (comment)

feat: Stateless config.yml for Kubernetes ConfigMap mounts

Is your feature request related to a problem? Please describe.
Thanks for this awesome software. I self-host >30 apps on my own Kubernetes and keeping them up-to-date (without automatic image updates breaking services) is quite a big pain point for me.

Running Argus on Kubernetes, I tried mounting config.yml in /etc/argus but since ConfigMap mounts in Kubernetes are read-only, this automatically fails as Argus tries to write back to config.yml for each service, the status key.

As such, I've had to run an initContainer using the same argus image, that mounts the config.yml in another location first, and copies it to the final location in /etc/argus/config.yml before running the 'real' Argus container.

Describe the solution you'd like
For config.yml to be stateless so that it can be mounted as read-only. State can be stored somewhere else perhaps in a sqlite DB or another plain state.yml file. This also has the benefit of keeping responsibilities separate, where only configuration belongs in config.yml and state, elsewhere.

Describe alternatives you've considered
I'm currently running the initContainer copy method as described above. The current approach is not breaking anything at the moment, but it's probably the first time I've encountered state stored in the same file as the configuration.

Additional context
I'm also versed in Golang and would be happy to help with this feature with a PR.

Docker Tag Usage Error Logging

Working on setting up a Docker tag check another application. I am somewhat confused by the error in the log. If I do not have the require block in, the check works as expected. If I add the block, the logs show ERROR: Testing (Ombi), No version matching the conditions specified could be found for "Ombi" at "https://github.com/Ombi-app/Ombi/releases". I know that is not the case as it works without the require block. Guessing the check that is failing is really against https://hub.docker.com/r/linuxserver/ombi/tags???

config.yml
  Ombi:
    options:
      semantic_versioning: false
    latest_version:
      type: url
      url: https://github.com/Ombi-app/Ombi/releases
      use_prerelease: true
      url_commands:
        - type: regex
          regex: releases\/tag\/v([0-9.]+)
      require:
        regex_content: 'amd64-development-version-v{{ version }}'
        regex_version: ([0-9.]+)$ 
        docker:
          type: hub
          image: linuxserver/ombi
          tag: v{{ version }}
    deployed_version:
      url: http://osu.ombi:3579/ombi/api/v1/Settings/about?apikey=<redacted>
      json: version
    notify:
      MAILRISE_NOTIFICATION: {}
    webhook:
      WEBHOOK_DRONE_BUILD:
        url: http://192.168.1.104:9358/hooks/build_docker?container=ombi
    dashboard:
      auto_approve: true
      icon: https://raw.githubusercontent.com/walkxhub/dashboard-icons/master/png/ombi.png
      icon_link_to: http://osu.ombi:3579/ombi
      web_url: https://github.com/Ombi-app/Ombi/releases

help: Clarification on how to properly use new (0.5.1) Shoutrrr notifications

Hello,

I am trying to use the new shoutrrr notification to send telegram messages. I have created an entry in:

defaults:
  notify:
    telegram_updates:
      type: telegram
      url_fields:
        Token: TOKEN_FROM_BOTFATHER
      params:
        Chats: 'chat_id'
  • Do I need now to add a "notify:" entry for each service for them to notify on new releases? I haven't and I don't receive any notifications. (makes sense as I only want to receive notifications on certain services not all).
  • If I add an entry "notify: telegram_updates:" in a service it complains that the type is needed, if I then add the type it asks for token, so it seems I need to repeat the config in defaults.

Is this the expected behaviour? Regards,

feat: Support for action to check and update a single service

Wondering if you could add a second action button beside the webhook action button (or in the upper right hand corner) that would enable the check and update in the UI if applicable of a single service on demand. Not sure if that is going to complicate some of the logic around auto_approve, interval, retires, etc. Hoping maybe you could just ignore all of that logic, and if the UI needs updated, update in the db and UI and reset everything. If not, do nothing and let those parameters do their thing.

Disable a Service in `config.yml`

Disable a service without removing it from the config.yml entirely

service:
  argus:
    active: false
    type: github
    url: release-argus/argus

Maybe another option could be adding a service option called active (or something more creative) with a value of true or false so that it is only added to the dashboard and checks if true. If not present, defaults to true. That way it can be kept in the config file at all times and set to false.

Originally posted by @samcro1967 in #85 (comment)

bug: "skip release" seems to do nothing.

Describe the bug
Skip release seems to have stop wroking

To Reproduce
Steps to reproduce the behavior:

  1. Use a release with deployed version configure but no webhook to update.
  2. Wait for a new release to appear.
  3. Click on 'skip release'
  4. Nothing happens, still the release is there with "Update available"

Expected behavior
Release is removed until next one

Desktop (please complete the following information):

  • argus running on docker
  • Version 0.8.0

Rename `current_version` to `deployed_version`

Suggested in #55. Rename status.current_version* to status.deployed_version as it's more relevant/user friendly. Was originally called current_version as I thought that version API's were hard to come by and so wouldn't monitor them to get the current_version.

Would like it to still parse current_version for a few versions and just convert it to deployed_version

feat: give webhooks the option for accepting invalid HTTPS certs

webhooks currently fail to send if the cert is invalid (e.g. self-signed). This'll add an allow_invalid_certs key to each webhook (with support for it in defaults/globally like notify)

Triggered by:
Originally posted by @samcro1967 in #61 (comment)

So for fun (I mean who doesn't love certs), I changed webhook to use https. I get a different error in the webhook log when I execute the webhook from Argus, but I am guessing it is related to how I generated the self signed cert. Thought I would share in case it sheds any new light on the topic.

webhook log

[webhook] 2022/05/26 15:30:37 http: TLS handshake error from 172.18.0.14:41156: tls: oversized record received with length 21536

cert generation command

openssl req -new -x509 -sha256 -newkey rsa:2048 -nodes -keyout key.pem -days 9999 -out cert.pem`

visual indicator

Hi,

maybe a stupid question, but is there an visual indicator for a new release when I dont use "deployed version" and or webhooks?

I just see the new version number when there was a change and no indicator.

feat: Confused about latest / current / approved versions

I am somehow confused about how Argus reports the current/latest version and the deployed one. If I understand, if you provide a way to get the deployed version, argus shows the deployed version number with an "info" icon (no latest version is shown). If no way to get the deployed version, argus shows no "info" icon and shows the current version. Is this the current behaviour? If so, I think it would be clearer to show both versions (latest and deployed) always, if no deployed then you can show only latest.

In the case of having a way to get the deployed version and a new version is found in github, an "update available" is shown (no webhooks so only the left blue info icon is shown (so the behaviour seems OK). However, what happens if I update externally the deployed version? Shouldn't argus detect it and automatically remove the "update available" panel? This does not seem to work in my installation, updated a service externally but argus keeps the message even though the deployed version should have changed.

Thanks anyway for this tool, I think it has a lot of potential in selfhosted installations!!!

Plex RegEx not working after upgrading to 0.9.0

I noticed that Plex is reporting no successful queries after upgrading to 0.9.0. I am grabbing the latest version from this link and using New\sBETA\sPMS\sVersion\sAvailable\s\-\s([0-9a-z\-.]+) as the RegEx match. The RegEx works at https://regoio.herokuapp.com and the same RegEx match works for the deployed version. From what I can tell link I am grabbing the latest version from has not changed. From what I can tell in the logs, it seems like everything is being parsed properly form the config file. Scratching my head on this one.

Logs

2022/08/11 14:06:10 INFO: Testing (Plex),
2022/08/11 14:06:10 WARNING: Plex (url_commands), regex "New\\sBETA\\sPMS\\sVersion\\sAvailable\\s\\-\\s([0-9a-z\\-.]+)" didn't return any matches
2022/08/11 14:06:10 ERROR: Testing (Plex), No version matching the conditions specified could be found for "Plex" at "https://www.reddit.com/r/PleX/search/?q=%22New%20BETA%20PMS%20Version%20Available%22&restrict_sr=1&sr_nsfw=&t=month&sort=new"

2022/08/11 14:06:10 INFO: Testing (Plex), Deployed version - "1.28.1.6041-738907df3"
Config.yml
  Plex:
    options:
      semantic_versioning: false
      comment: New\sBETA\sPMS\sVersion\sAvailable\s\-\s([0-9a-z\-.]+)
    latest_version:
      type: url
      url: https://www.reddit.com/r/PleX/search/?q=%22New%20BETA%20PMS%20Version%20Available%22&restrict_sr=1&sr_nsfw=&t=month&sort=new
      url_commands:
        - type: regex
          regex: New\sBETA\sPMS\sVersion\sAvailable\s\-\s([0-9a-z\-.]+)
    deployed_version:
      url: http://osu.plex:32400/?X-Plex-Token=<redacted>
      regex: updater=\"1\" version=\"([0-9a-z\-.]+)\"
    notify:
      MAILRISE_NOTIFICATION: {}
    webhook:
      WEBHOOK_DRONE_BUILD:
        url: http://192.168.1.104:9358/hooks/build_docker?container=plex
    dashboard:
      auto_approve: true
      icon: https://raw.githubusercontent.com/walkxhub/dashboard-icons/master/png/plex.png
      icon_link_to: http://osu.plex:32400/web/

Move services out of primary config file into a services folder

I'd like to request a feature where in instead of configuring all of the services as part of the primary config file, that the primary config file pull them from any .yml file in a given services folder.

I've been playing around with services all afternoon and got 3 working, after which I commented them all out in the config file in order to work on a 4th (logging was getting very busy) only to realize that the server overwrite / deleted all commented lines in the config file thus resulting in me needing to start from scratch on the 3 I had already got working.

Having each service be it's own file would allow for easy enabling/disabling by renaming the files to a non .yml extension and would also just keep everything a lot more organized when you end up with dozens of monitored services (my goal is to use this to monitor all server based applications we host eventually which could end up being quite a lot)

Add ability to resend Webhooks when not on latest version

If I understand the current webhook implementation, once a new version is detected and a webhook is successfully sent, you can not resend it. Restarting Argus reenables the ability to send it again. I can resend a webhook on a service whose deployed version matches the current version. This seems backward to me. I want to resend a webhook on a service that is still not up to date, not on a service that is already up to date. Maybe I am thinking about this in the wrong way???

I have services setup to auto approve with a delay of one hour. This seems to work 90+ percent of the time. Occasionally even though the webhook is successfully sent and executed, the version is still not updated. This is happening as the updates have not replicated throughout CDN when the webhook is pulling the latest docker image as an example. This time will vary obviously so I settled on an hour as it works most of the time.

Ideally I think from a process flow it would look like this when auto approve is enabled:

Interval check
New version is detected
Delay times out
Webhook is executed
Interval check
Version is still not up to date
Webhook is executed again
Interval check
Version is still not up to date
Webhook is executed again
Interval check
Version is up to date

Would probably want some max retry around the webhook upgrade executions different than retrying the webhook because it failed to send the webhook. After a few failures, human intervention will probably be required. No point in staying in that hamster wheel forever. Thoughts?

ERROR: release-argus/argus, Get "http://192.168.1.104:8111/api/v1/version": EOF

I noticed yesterday that the current version for Argus started failing. I can curl http://192.168.1.104:8111/api/v1/version from the container and get the expected results so it does not appear to be a connectivity issue.

I see the following in the logs:
ERROR: release-argus/argus, Get "http://192.168.1.104:8111/api/v1/version": EOF

I checked the docs after the project rename thinking something might have been updated, but not seeing anything other than the project name in the Github URL.

Config.xml for Argus

  release-argus/argus:
    type: github
    url: release-argus/argus
    web_url: https://github.com/release-argus/Argus/blob/master/CHANGELOG.md
    icon: https://github.com/release-argus/Argus/raw/master/web/ui/static/favicon.svg
    deployed_version:
      url: http://192.168.1.104:8111/api/v1/version
      json: version

I have also noticed that once it does that check a blank line is added in config.xml after the Argus section. On container restart, this causes it to be the only service parsed. Removing the container, removing the blank line from config.xml, and restarted the container then parses all services again.

Webhook Usage Question

Working on implementing webhooks. I am running Gitea and Drone. Each repo in Gitea has a webhook defined that triggers a build in Drone.

The webhook looks like http://osu.drone:3070/hook?secret=<redacted>

I have never used webhooks before so I am guessing I am just doing something wrong. When I click approve, it tries three times and fails.

Logs

INFO: wsServiceAction (192.168.1.227), CaddyRealIP Release approved - "GITEA_WEBHOOK" WebHook
INFO: GITEA_WEBHOOK (CaddyRealIP), (200) WebHook received
INFO: wsServiceAction (192.168.1.227), CaddyRealIP Release approved - "ALL UNSENT/FAILED" WebHook

Global Block Webook Definition

webhook:
  GITEA_WEBHOOK:
    type: web
    url: http://osu.drone:3070/hook?secret=
    secret: SECRET
    DesiredStatusCode: 201
    delay: 0s
    max_tries: 3
    silent_fails: false

CaddyRealIP Service Definition

  CaddyRealIP:
    type: url
    url: https://github.com/kirsch33/realip/tags
    semantic_versioning: false
    url_commands:
      - type: regex
        regex: releases\/tag\/(v[0-9.]+)
    web_url: https://github.com/kirsch33/realip/releases
    icon: https://raw.githubusercontent.com/walkxhub/dashboard-icons/master/svg/caddy.svg
    gotify:
      GOTIFY_NOTIFICATION: {}
    webhook:
      GITEA_WEBHOOK:
        secret: '<redacted>'
    deployed_version:
      url: http://osu.logs:8069/caddy2/current_version.txt
      regex: realip\s?(v[0-9.]+)

Config File Suggestions

If you are open to a suggestion, I would probably make a few tweaks to the config.yml structure to make it a little easier to navigate for new users. I realize this would be a breaking change. Maybe it could be incorporated into the version that adds settings thru the GUI. First step is to validate the config.xml structure and adjust accordingly. Below would be my suggestion.

Current Example

  Sonarr/Sonarr:
    type: url
    url: http://services.sonarr.tv/v1/releases
    semantic_versioning: false
    url_commands:
      - type: regex
        regex: \"version\":\s?\"([0-9.]+)\"
        index: 1
    web_url: http://osu.sonarr:8079/sonarr/system/updates
    icon: https://raw.githubusercontent.com/NX211/homer-icons/master/png/sonarr.png
    deployed_version:
      url: http://osu.sonarr:8079/sonarr/api/v3/system/status?apikey=428f9a8d1420426ca21a891c928594b5
      json: version

Proposed Example

  Sonarr/Sonarr:
    options:
      semantic_versioning: false
    latest_version:
      type: url
      url: http://services.sonarr.tv/v1/releases
      url_commands:
        - type: regex
          regex: \"version\":\s?\"([0-9.]+)\"
          index: 1
    dashboard:
      web_url: http://local.sonarr:8079/sonarr/system/updates
      icon: https://raw.githubusercontent.com/walkxhub/dashboard-icons/master/png/sabnzbd.png
    deployed_version:
      url: http://local.sonarr:8079/sonarr/api/v3/system/status?apikey=<redacted>
      json: version

Notify config removed after config.xml is updated

I noticed that since updating to the latest master commit on Fri., the notify config for services is removed after a scan is complete and config.xml is updated. Below is a before and after. The notification does work on the first run, but 30 mins later on the next run and all those thereafter, no notifications are sent.

Before starting Argus

  Caddy:
    type: url
    url: https://github.com/caddyserver/caddy/tags
    semantic_versioning: false
    url_commands:
      - type: regex
        regex: releases\/tag\/(v[0-9.]+)
    web_url: https://github.com/caddyserver/caddy/releases
    icon: https://raw.githubusercontent.com/walkxhub/dashboard-icons/master/svg/caddy.svg
    notify:
      MAILRISE_NOTIFICATION: {}
    webhook:
      WEBHOOK_DRONE_BUILD:
        url: http://192.168.1.104:9357/hooks/drone-build?container=caddy
    deployed_version:
      url: http://osu.logs:8069/caddy2/current_version.txt
      regex: caddy.adapters.caddyfile\s?(v[0-9.]+)

After Argus starts, scan all services, and updates config.xml

  Caddy:
    type: url
    url: https://github.com/caddyserver/caddy/tags
    semantic_versioning: false
    url_commands:
      - type: regex
        regex: releases\/tag\/(v[0-9.]+)
    web_url: https://github.com/caddyserver/caddy/releases
    icon: https://raw.githubusercontent.com/walkxhub/dashboard-icons/master/svg/caddy.svg
    notify:
    webhook:
      WEBHOOK_DRONE_BUILD:
        url: http://192.168.1.104:9357/hooks/drone-build?container=caddy
    deployed_version:
      url: http://osu.logs:8069/caddy2/current_version.txt
      regex: caddy.adapters.caddyfile\s?(v[0-9.]+)
    status:
      deployed_version: v2.5.1
      deployed_version_timestamp: "2022-05-19T11:20:52Z"
      latest_version: v2.5.1
      latest_version_timestamp: "2022-05-19T12:26:00Z"

feat: Support for retrieving the current version from the Service itself

Is your feature request related to a problem? Please describe.
Updating the current version is difficult in setups with many tools and automatic updating.

Describe the solution you'd like
The possibility to update the current version of a software automatically via a kind of web monitor. With the possibility to use Basic Auth or Custom Header.

Example an API call for Authentik on https://authentik.example.com/api/v3/admin/version/ to get the current version

feat: Support for local webhooks

Please consider support for local webhooks such as webhook tool. It would also be extra-useful to somehow configure argus to change an HTTP Query parameter so different services can call the same webhook with different parameters. Such as for instance: http://192.168.9.9/hooks/update-docker?container=argus.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.