mirror of
https://github.com/crazy-max/diun.git
synced 2025-12-24 06:28:13 +01:00
5.9 KiB
5.9 KiB
Configuration
Overview
Here is a YAML structure example:
db:
path: diun.db
watch:
workers: 10
schedule: "0 * * * *"
first_check_notif: false
notif:
amqp:
enable: false
host: localhost
port: 5672
username: guest
password: guest
exchange:
queue: queue
gotify:
enable: false
endpoint: http://gotify.foo.com
token: Token123456
priority: 1
timeout: 10
mail:
enable: false
host: localhost
port: 25
ssl: false
insecure_skip_verify: false
username:
password:
from:
to:
rocketchat:
enable: false
endpoint: http://rocket.foo.com:3000
channel: "#general"
user_id: abcdEFGH012345678
token: Token123456
timeout: 10
slack:
enable: false
webhook_url: https://hooks.slack.com/services/ABCD12EFG/HIJK34LMN/01234567890abcdefghij
telegram:
enable: false
token: aabbccdd:11223344
chat_ids:
- 123456789
- 987654321
webhook:
enable: false
endpoint: http://webhook.foo.com/sd54qad89azd5a
method: GET
headers:
Content-Type: application/json
Authorization: Token123456
timeout: 10
regopts:
someregistryoptions:
username: foo
password: bar
timeout: 20
onemore:
username: foo2
password: bar2
insecure_tls: true
providers:
docker:
# Watch only labeled containers on local Docker engine
local:
watch_stopped: true
# Watch all containers on 10.0.0.1:2375
remote:
endpoint: tcp://10.0.0.1:2375
watch_by_default: true
swarm:
# Watch all services on local Swarm cluster
myswarm:
watch_by_default: true
file:
# Watch images from filename ./myimages.yml
filename: ./myimages.yml
# Watch images from directory ./imagesdir
directory: ./imagesdir
Reference
db
path: Path to Bolt database file where images manifests are stored (default:diun.db). Environment varDIUN_DBoverride this value.
watch
workers: Maximum number of workers that will execute tasks concurrently (default:10).schedule: CRON expression to schedule Diun watcher (default:0 * * * *).first_check_notif: Send notification at the very first analysis of an image. (default:false).
notif
-
amqpenable: Enable AMQP notifications (default:false).host: AMQP server host (default:localhost). requiredport: AMQP server port (default:5672). requiredusername: AMQP username. requiredusername_file: Use content of secret file as AMQP username ifusernamenot defined.password: AMQP password. requiredpassword_file: Use content of secret file as AMQP password ifpasswordnot defined.exchange: Name of the exchange the message will be sent to. (default:empty)queue: Name of the queue the message will be sent to. required
-
gotifyenable: Enable gotify notification (default:false).endpoint: Gotify base URL (e.g.http://gotify.foo.com). requiredtoken: Application token. requiredpriority: The priority of the message.timeout: Timeout specifies a time limit for the request to be made. (default:10).
-
mailenable: Enable email reports (default:false).host: SMTP server host (default:localhost). requiredport: SMTP server port (default:25). requiredssl: SSL defines whether an SSL connection is used. Should be false in most cases since the auth mechanism should use STARTTLS (default:false).insecure_skip_verify: Controls whether a client verifies the server's certificate chain and hostname (default:false).username: SMTP username.username_file: Use content of secret file as SMTP username ifusernamenot defined.password: SMTP password.password_file: Use content of secret file as SMTP password ifpasswordnot defined.from: Sender email address. requiredto: Recipient email address. required
-
rocketchatenable: Enable Rocket.Chat notification (default:false).endpoint: Rocket.Chat base URL (e.g.http://rocket.foo.com:3000). requiredchannel: Channel name with the prefix in front of it. requireduser_id: User ID. requiredtoken: Authentication token. requiredtimeout: Timeout specifies a time limit for the request to be made. (default:10).
-
slackenable: Enable slack notification (default:false).webhook_url: Slack incoming webhook URL. required
-
telegramenable: Enable Telegram notification (default:false).token: Telegram bot token. requiredchat_ids: List of chat IDs to send notifications to. required
-
webhookenable: Enable webhook notification (default:false).endpoint: URL of the HTTP request. requiredmethod: HTTP method (default:GET). requiredheaders: Map of additional headers to be sent.timeout: Timeout specifies a time limit for the request to be made. (default:10).
regopts
username: Registry username.username_file: Use content of secret file as registry username ifusernamenot defined.password: Registry password.password_file: Use content of secret file as registry password ifpasswordnot defined.timeout: Timeout is the maximum amount of time for the TCP connection to establish. 0 means no timeout (default:10).insecure_tls: Allow contacting docker registry over HTTP, or HTTPS with failed TLS verification (default:false).