Configuration
obsern init generates obsern.yaml in your current directory.
Base Template
Section titled “Base Template”run: tags: ["default"] tail_lines: 80
api: host_token: ${OBSERN_HOST_TOKEN} base_url: https://api.obsern.dev
notify: time_zone: "Asia/Tokyo" slack: webhook_url: ${OBSERN_SLACK_WEBHOOK_URL} discord: webhook_url: ${OBSERN_DISCORD_WEBHOOK_URL}Required Minimum
Section titled “Required Minimum”Set at least one of the following:
apinotify.slacknotify.discord
If none of them are configured, validation fails and obsern run stops.
Field Reference
Section titled “Field Reference”run.tags: Tags added to jobs and notifications.run.tail_lines: Number of trailing log lines to keep. Allowed range:0to200.api.host_token: Host token issued from the dashboard.api.base_url: Absolute API URL used to publish job status.notify.time_zone: IANA time zone used when rendering notification timestamps, for exampleAsia/Tokyo.notify.slack.webhook_url: Slack Incoming Webhook URL.notify.discord.webhook_url: Discord webhook URL.
Common Setup Patterns
Section titled “Common Setup Patterns”API only:
run: tags: ["default"] tail_lines: 80
api: host_token: ${OBSERN_HOST_TOKEN} base_url: https://api.obsern.devSlack only:
run: tags: ["default"] tail_lines: 80
notify: time_zone: "Asia/Tokyo" slack: webhook_url: ${OBSERN_SLACK_WEBHOOK_URL}Discord only:
run: tags: ["default"] tail_lines: 80
notify: time_zone: "Asia/Tokyo" discord: webhook_url: ${OBSERN_DISCORD_WEBHOOK_URL}API + notifications:
run: tags: ["default"] tail_lines: 80
api: host_token: ${OBSERN_HOST_TOKEN} base_url: https://api.obsern.dev
notify: time_zone: "Asia/Tokyo" slack: webhook_url: ${OBSERN_SLACK_WEBHOOK_URL} discord: webhook_url: ${OBSERN_DISCORD_WEBHOOK_URL}Environment Variables
Section titled “Environment Variables”Use environment variables for secrets instead of hardcoding them in obsern.yaml.
export OBSERN_HOST_TOKEN="<your-host-token>"export OBSERN_SLACK_WEBHOOK_URL="https://hooks.slack.com/services/..."export OBSERN_DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/..."Pre-run Checklist
Section titled “Pre-run Checklist”obsern.yamlexists.- At least one of
api,notify.slack, ornotify.discordis configured. run.tail_linesis within the range0to200.- Environment variables are available in the same shell session.