专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

cloudflare/complainer Docker 镜像 - 轩辕镜像

complainer
cloudflare/complainer
自动构建
Complainer's job is to send notifications to different services when tasks fail on Mesos cluster.
0 次下载
⏱️ 镜像拉取更稳定,部署项目不再心跳加速
镜像简介版本下载
⏱️ 镜像拉取更稳定,部署项目不再心跳加速

Complainer

Complainer's job is to send notifications to different services when tasks fail on Mesos cluster. While your system should be reliable to failures of individual tasks, it's nice to know when things fail and why.

Supported log upload services:

  • No-op - keeps URLs to Mesos slave sandbox.
  • S3 - both AWS S3 and on-premise S3-compatible API.

Supported reporting services:

  • Sentry - a great crash reporting software.
  • Hipchat - not so great communication platform.
  • Slack - another communication platform.
  • File - regular file stream output, including stdout/stderr.

Quick start

Start sending all failures to Sentry:

docker run -it --rm cloudflare/complainer \
  -masters=[***] \
  -uploader=noop \
  -reporters=sentry \
  -sentry.dsn=[***]

Run this on Mesos itself!

!Sentry screenshot

Reporting configuration

Complainer needs two command line flags to configure itself:

  • name - Complainer instance name (default is default).
  • default - Whether to use default instance for each reporter implicitly.
  • masters - Mesos master URL list (ex: [***]).
  • listen - Listen address for HTTP (ex: 127.0.0.1:8888).

These settings can be applied by env vars as well:

  • COMPLAINER_NAME - Complainer instance name (default is default).
  • COMPLAINER_DEFAULT - Whether to use default instance for each reporter implicitly.
  • COMPLAINER_MASTERS - Mesos master URL list (ex: [***]).
  • COMPLAINER_LISTEN - Listen address for HTTP (ex: 127.0.0.1:8888).

Filtering based on the failures framework

If you're in the situation where you have multiple marathons running against a mesos, and want to segregate out which failures go where, the following options are of interest. Each option can be specified multiple times.

  • framework-whitelist - This is a regex option; if given, the failures framework must match at least one whitelist. If no whitelist is specified, then it's treated as if '.*' had been passed- all failures are whitelisted as long as they don't match a blacklist.
  • framework-blacklist - This is a regex option; if given, any failure that matches this are ignored.

Note that the order of evaluation is such that blacklists are applied first, then whitelists.

HTTP interface

Complainer provides HTTP interface. You have to enable it with -listen command line flag or with COMPLAINER_LISTEN env variable.

This interface is used for the following:

  • Health checks
  • pprof endpoint
Health checks

/health endpoint reports 200 OK when things are operating mostly normally and 500 Internal Server Error when complainer cannot talk to Mesos.

We don't check for other issues (uploader and reporter failures) because they are not guaranteed to be happening continuously to recover themselves.

version endpoint

/version endpoint reports 200 OK and outputs the current version of this application.

complainer (default) v1.7.0
pprof endpoint

/debug/pprof endpoint exposes the regular net/http/pprof interface:

  • [***]
Log upload services

Log upload service is specified by command line flag uploader. Alternatively you can specify this by env var COMPLAINER_UPLOADER. Only one uploader can be specified per complainer instance.

no-op

Uploader name: noop

No-op uploader just echoes Mesos slave sandbox URLs.

S3 AWS

Uploader name: s3aws.

This uploader uses official AWS SDK and should be used if you use AWS.

Stdout and stderr logs get uploaded to S3 and signed URLs provided to reporters. Logs are uploaded into the following directory structure by default:

  • ${YYYY-MM-DD}/complainer/${task_name}/${YYYY-MM-DDTHH:mm:ssZ}-${task_id}/{stdout,stderr}

Command line flags:

  • s3aws.access_key - S3 access key.
  • s3aws.secret_key - S3 secret key.
  • s3aws.region - S3 region.
  • s3aws.bucket - S3 bucket name.
  • s3aws.prefix - S3 prefix template (Failure struct is available).
  • s3aws.timeout - Timeout for signed S3 URLs (ex: 72h).

You can set value of any command line flag via environment variable. Example:

  • Flag s3aws.access_key becomes env variable S3_ACCESS_KEY

Flags override env variables if both are supplied.

The minimum AWS policy for complainer is s3:PutObject:

  • [***]

S3 Compatible APIs

Uploader name: s3goamz.

This uploader uses goamz package and supports S3 compatible APIs that use v2 style signatures. This includes Ceph Rados Gateway.

Stdout and stderr logs get uploaded to S3 and signed URLs provided to reporters. Logs are uploaded into the following directory structure by default:

  • ${YYYY-MM-DD}/complainer/${task_name}/${YYYY-MM-DDTHH:mm:ssZ}-${task_id}/{stdout,stderr}

  • s3goamz.access_key - S3 access key.

  • s3goamz.secret_key - S3 secret key.

  • s3goamz.endpoint - S3 endpoint (ex: [***]).

  • s3goamz.bucket - S3 bucket name.

  • s3goamz.prefix - S3 prefix template (Failure struct is available).

  • s3goamz.timeout - Timeout for signed S3 URLs (ex: 72h).

You can set value of any command line flag via environment variable. Example:

  • Flag s3goamz.access_key becomes env variable S3_ACCESS_KEY

Flags override env variables if both are supplied.

Reporting services

Reporting services are specified by command line flag reporters. Alternatively you can specify this by env var COMPLAINER_REPORTERS. Several services can be specified, separated by comma.

Sentry

Command line flags:

  • sentry.dsn - Default Sentry DSN to use for reporting.

Labels:

  • dsn - Sentry DSN to use for reporting.

If label is unspecified, command line flag value is used.

Hipchat

Command line flags:

  • hipchat.base_url - Base Hipchat URL, needed for on-premise installations.
  • hipchat.room - Default Hipchat room ID to send notifications to.
  • hipchat.token - Default Hipchat token to authorize requests.
  • hipchat.format - Template to use in messages.

Labels:

  • base_url - Hipchat URL, needed for on-premise installations.
  • room - Hipchat room ID to send notifications to.
  • token - Hipchat token to authorize requests.

If label is unspecified, command line flag value is used.

Templates are based on text/template. The following fields are available:

  • failure - Failure struct.
  • stdoutURL - URL of the stdout stream.
  • stderrURL - URL of the stderr stream.
Slack

Command line flags:

  • slack.hook_url - Webhook URL, needed to post something (required).
  • slack.channel - Channel to post into, e.g. #mesos (optional).
  • slack.username - Username to post with, e.g. "Mesos Cluster" (optional).
  • slack.icon_emoji - Icon Emoji to post with, e.g. ":mesos:" (optional).
  • slack.icon_url - Icon URL to post with, e.g. "[***]" (optional).
  • slack.format - Template to use in messages.

Labels:

  • hook_url - Webhook URL, needed to post something (required).
  • channel - Channel to post into, e.g. #mesos (optional).
  • username - Username to post with, e.g. "Mesos Cluster" (optional).
  • icon_emoji - Icon Emoji to post with, e.g. ":mesos:" (optional).
  • icon_url - Icon URL to post with, e.g. "[***]" (optional).

If label is unspecified, command line flag value is used.

For more details see Slack API docs.

Templates are based on text/template. The following fields are available:

  • failure - Failure struct.
  • stdoutURL - URL of the stdout stream.
  • stderrURL - URL of the stderr stream.
Jira

Command line flags:

  • jira.url - Default JIRA instance url (required).
  • jira.username - JIRA user to authenticate as (required).
  • jira.password - JIRA password for the user to authenticate (required).
  • jira.issue_closed_status - The status of JIRA issue when it is ***ed closed.
  • jira.fields - JIRA fields in key:value;... format seperated by ;, this configuration MUST contain Project, Summary and Issue Type.

Example jira.fields:

Project:COMPLAINER;Issue Type:Bug;Summary:Task {{ .failure.Name }} died with status {{ .failure.State }};Description:[stdout|{{ .stdoutURL }}], [stderr|{{ .stderrURL }}], ID={{ .failure.ID }}

Templates are based on text/template. The following fields are available:

  • failure - Failure struct.
  • stdoutURL - URL of the stdout stream.
  • stderrURL - URL of the stderr stream.
File

Command line flags:

  • file.name - File name to output logs.
  • file.format - Template to use in output logs.

Templates are based on text/template. The following fields are available:

  • failure - Failure struct.
  • stdoutURL - URL of the stdout stream.
  • stderrURL - URL of the stderr stream.
Label configuration
Basics

To support flexible notification system, Mesos task labels are used. Marathon task labels get copied to Mesos labels, so these are equivalent.

The minimal set of labels needed is an empty set. You can configure default values in Complainer's command line flags and get all notifications with these settings. In practice, you might want to have different reporters for different apps.

Full format for complainer label name looks like this:

  • complainer_${name}_${reporter}_instance_${instance}_${key}

Example (dsn set for default Sentry of default Complainer):

  • complainer_default_sentry_instance_default_dsn

This is long and complex, so default parts can be skipped:

  • complainer_sentry_dsn
Advanced labels

The reason for having long label name version is to add the flexibility. Imagine you want to report app failures to the internal Sentry, two internal Hipchat rooms (default and project-specific) and the external Sentry.

Set of labels would look like this:

  • complainer_sentry_dsn: ABC - for internal Sentry.
  • complainer_hipchat_instances: default,myapp - adding instance myapp.
  • complainer_hipchat_instance_myapp_room: 123- setting room for myapp.
  • complainer_hipchat_instance_myapp_token: XYZ- setting token for myapp.
  • complainer_external_sentry_dsn: FOO - for external Sentry.

Internal and external complainers can have different upload services.

Implicit instances are different, depending on how you run Complainer.

  • -default=true (default) - default instance is implicit.
  • -default=false - no instances are configured implicitly.

The latter is useful for opt-in monitoring, including monitoring of Complainer itself (also known as dogfooding).

Templating

Templates are based on text/template. The following fields are available:

  • nl - Newline symbol (\n).
  • config - Function to get labels for the reporter.
  • failure - Failure struct: [***]
  • stdoutURL - URL of the stdout stream.
  • stderrURL - URL of the stderr stream.

With config you can use labels in templates. For example, the following template for the Slack reporter:

Task {{ .failure.Name }} ({{ .failure.ID }}) died | {{ config "mentions" }}{{ .nl }}

With the label complainer_slack_mentions=@devs will be evaluated to:

Task foo.bar (bar.foo.123) died | @devs
Dogfooding

To report errors for complainer itself you need to run two instances:

  • default to monitor all other tasks.
  • dogfood to monitor the default Complainer.

You'll need the following labels for the default instance:

yaml
labels:
  complainer_dogfood_sentry_instances: default
  complainer_dogfood_hipchat_instances: default

For the dogfood instance you'll need to:

  • Add -name=dogfood command line flag.
  • Add -default=false command line flag.

Since the dogfood Complainer ignores apps with not configured instances, it will ignore every failure except for the default instance failures.

If the dogfood instance fails, default reports it just like any other task.

If both instances fail at the same time, you get nothing.

Copyright

  • Copyright 2016 CloudFlare

License

MIT

查看更多 complainer 相关镜像 →
cloudflare/hello-world logo
cloudflare/hello-world
一个可在Cloudflare容器运行时中运行的简单示例应用。
500K+ pulls
上次更新:未知
cloudflare/origin-ca-issuer logo
cloudflare/origin-ca-issuer
暂无描述
1500K+ pulls
上次更新:未知
cloudflare/quiche-qns logo
cloudflare/quiche-qns
用于QUIC协议互操作性测试工具quic-interop-runner的quiche实现镜像,支持QUIC协议实现间的互操作性测试。
4100K+ pulls
上次更新:未知
cloudflare/sandbox logo
cloudflare/sandbox
暂无描述
50K+ pulls
上次更新:未知
cloudflare/daphne-worker-helper logo
cloudflare/daphne-worker-helper
暂无描述
10K+ pulls
上次更新:未知
octodns/cloudflare logo
octodns/cloudflare
仅集成Cloudflare提供商的OctoDNS工具,用于DNS记录的管理与同步。
10K+ pulls
上次更新:未知

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

MacOS OrbStack

MacOS OrbStack 容器配置

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
cloudflare/complainer
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
咨询镜像拉取问题请 提交工单,官方技术交流群:1072982923
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
咨询镜像拉取问题请提交工单,官方技术交流群:
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.