Git Product home page Git Product logo

catalog's Introduction

sensu

Build Status Gem Version MIT Licensed Join the chat at https://slack.sensu.io/

โš ๏ธ ANNOUNCEMENT - Sensu 1.x has reached End-Of-Life (December 31st, 2019)

The Sensu 1.x project reached end-of-life on December 31st, 2019. The existing package repositories became unreachable on January 6th, 2020. Please see our blog post for more details: https://blog.sensu.io/announcing-the-sensu-archives

Sensu 1.x has been superseded by Sensu Go.

As always, we want to hear from the Community and please reach out on Slack or Discourse if you have any questions or concerns.

Sensu

A simple, malleable, and scalable framework for composing the monitoring system you need.

Sensu is offered in two flavors:

  • Sensu Core - this open source project
  • Sensu Enterprise - a full-featured commercial implementation, built on Sensu Core

Installation

Sensu supports a number of Unix-like platforms, as well as Windows. Please see the list of supported platforms for installation instructions.

Documentation

Please refer to the online documentation for details on configuring and operating Sensu.

Getting Help

If you have questions not covered by the documentation, the Sensu community is here to help. Please check out our chat on Slack, or the sensu-users discussion list.

Commercial support is also available. See the support section of our website for more detail.

Contributing

Please observe these guidelines on contributing.

License

Sensu Core is released under the MIT license.

catalog's People

Contributors

amdprophet avatar asachs01 avatar c-kruse avatar calebhailey avatar ccressent avatar echlebek avatar fguimond avatar gd8 avatar hillaryfraley avatar jamesdphillips avatar jhenderson-pro avatar jspaleta avatar nixwiz avatar portertech avatar thoward avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

catalog's Issues

Setup project labels

We know we want a "help wanted" label (or similar), but we'll likely also need some other labels to organize outstanding issues and PRs.

Repository maintenance

Hi there, future self. ๐Ÿ‘‹ Please thank your past self for leaving behind some breadcrumbs in case there's ever any confusion about links to this project or its predecessors. ๐Ÿ˜…

Please note the following comments regarding the origin of this project, and associated maintenance that has been in progress over the past several weeks:

The original Sensu template projects were created in the sensu-community GitHub org as two separate projects: sensu-community/monitoring-checks and sensu-community/monitoring-pipelines.

The original announcement about these initiatives was made in the Sensu Community Forums, here: https://discourse.sensu.io/t/introducing-curated-configurations-a-new-way-to-contribute-and-share-operational-expertise/1732

The idea behind splitting these projects out into a new GitHub org was that we wanted to demarcate them as property of the community and eventually hand over maintenance to the community. In the end this demarcation didn't serve its intended purpose, so we decided to move the project to the main sensu GitHub org. We also decided to merge the two projects together as simply one "catalog" of Sensu monitoring-as-code templates.

To complete this transition I have temporarily transferred ownership of https://github.com/sensu/catalog to https://github.com/sensu-community to enable GitHub issue transfers. Once this transfer is complete I will transfer the repository back to https://github.com/sensu/catalog and close this issue.

๐Ÿช

Add a "helloworld" integration template including README and sensu-integration.yaml

See #52

  • Create a new directory at integrations/example/helloworld

  • Create a template README.md at integrations/example/helloworld/README.md with the following outline:

    ## Description 
    
    ## Supported Dashboards 
    
    ## Setup 
    
    ## Plugins 
    
  • Create a template sensu-integration.yaml at integrations/example/helloworld/sensu-integration.yaml with the following contents:

    ---
    api_version: v1
    type: Integration
    metadata:
      namespace: sensu
      name: helloworld
    spec: 
      class: community
      provider: agent/check
      short_description: Example Sensu Integration
      supported_platforms: 
      - linux
      - windows
      - darwin
      tags:
      - example
      - helloworld
      contributors:
      - "@calebhailey"
      - "@jsplata"
      prompts:
      - var: integration_name
        type: string
        prompt: "Integration Name"
        default: helloworld
      - var: integration_interval
        type: int
        prompt: "How often do you want to perform this healthcheck?"
        default: 30
      - var: integration_world
        type: int
        prompt: "What world do you want to greet?"
        default: 30
      resource_updates:
      - type: CheckConfig
        api_version: core/v2
        name: helloworld
        fields:
        - name: metadata.name
          action: replace
          value: integration_name
        - name: spec.interval
          action: replace
          value: integration_interval
        - name: spec.command
          action: replace
          template: >-
            echo "Hello {{ .annotations.helloworld | default "[[ integration_world ]]" }} world!"
  • Create a template sensu-resources.yaml at integrations/example/helloworld/sensu-resources.yaml with the following contents:

    ---
    type: CheckConfig
    api_version: core/v2
    metadata:
      name: healthcheck
    spec:
      command: >-
        Hello {{ .annotations.helloworld | default "integration" }} world!
      runtime_assets: []
      publish: true
      subscriptions:
        - example
      interval: 30
      timeout: 10
      pipelines:
      - api_version: core/v2
        type: Pipeline
        name: pagerduty
  • Add a generic logo PNG to integrations/example/helloworld/logo.png

Need a hello world handler example in scope

Strawperson Idea:

use a simple jq pipeline as a pipe hnalder command with an output file to hold the output.

Ideal:

Ideally we'd want a simple golang command that would do simple json parsing and output to a file using a secrect populated envvar. Something we could turn into an asset.

[EPIC]: Sensu Integration roadmap

Convert prototype Sensu Catalog Templates from this branch to spec-compliant Sensu Integrations:

P0 (Sensu Plus enablement):

NOTE: these are high priority, but all have special requirements; please contact @calebhailey for more details.

P1 (monitoring/collection integrations w/ supported plugins):

P2 (monitoring/collection integrations that may require plugin maintenance):

P3 (pipeline/processing integrations):

P4 (examples):

Completed:

Determine standard for variables that need replacing/updating

For items that would need to be replaced for a resource to work, we should have a standard naming convention.

Possibles:
REPLACEME_DESCRIPTION
CHANGEME_DESCRIPTION
UPDATE_DESCRIPTION

For items that have a standard value (such as port numbers), we should use those instead of a reference. Doing a sensuctl create on the below would error out because spec.socket.port is expected to be an integer.

---
type: Handler
api_version: core/v2
metadata:
  name: graphite_tcp
  namespace: default
spec:
  env_vars: []
  filters: []
  handlers: []
  mutator: only_check_output
  runtime_assets: []
  secrets:
  socket:
    host: REPLACEME_GRAPHITE_HOST
    port: REPLACEME_GRAPHITE_PORT
  timeout: 0
  type: tcp

Should we also consider using localhost for any host or URL defaults?

[SPIKE] POC Sensu Catalog Dockerfile

Once we have a working catalog-api generator (depends on sensu/catalog-api#1), we ought to be able to publish the Catalog API as a Docker image using the NGINX base image, a custom nginx.conf file, and catalog-api build output.

  • Init a Dockerfile based on the official NGINX image
  • Init an nginx.conf file with route-based headers for CORS (if required), Cache-Control, and Content-Type (for JSON and PNG contents)
  • Build and embed the API contents using catalog-api

๐Ÿ’ฅ

Add new system/disk-monitoring integration(s)

Jira Software Project Integration

This needs a template, it also need to include documentation and/or the handler README needs better explanation about adding the resolution screen necessary for the handler to close/resolve issues.

Review and improve Zookeeper checks

The current set of checks for Zookeeper are based off best guesses and defaults. They need review by someone who has worked with Zookeeper and can provide feedback and/or changes.

Add new mysql/mysql-monitoring integration

Add new system/filesystem-monitoring integration(s)

Windows checks need work

Templates are needed for windows checks found in sensu-plugins-windows.

The sensu-plugins-windows checks are available in Bonsai from this fork, but not from the "official" upstream repo.

Add new system/process-monitoring integration(s)

Add first auto-discovery examples

Requirements:

  • Figure out how to indicate Sensu version compatibility (auto-discovery checks require Sensu Go 6+)
  • TBD how to organize templates that are tightly coupled monitor+pipeline (check+handler) solutions. Should we drop the /monitors and /pipelines top-level directories and move all the integration folders to the root level of the repo?
  • TBD if we need a separate pipeline/handler template for https://github.com/sensu/sensu-entity-manager

Update the system/host-monitoring integration(s) w/ metric_thresholds for cpu, memory, io, load, etc

Update the Sensu Catalog README with the Sensu Integration specification

Document the Sensu Integration specification, including the integration directory structure and new sensu-integration.yaml resource.

Directory structure

integrations/
โ””โ”€โ”€ <service; e.g. "nginx">/
    โ””โ”€โ”€ <integration; e.g. "nginx-healthcheck">/
        โ”œโ”€โ”€ CHANGELOG.md
        โ”œโ”€โ”€ README.md
        โ”œโ”€โ”€ logo.png
        โ”œโ”€โ”€ sensu-integration.yaml
        โ””โ”€โ”€ sensu-resources.yaml
  • sensu-integration.yaml (required)

    Integration metadata properties. See below RE: Sensu Integration YAML specification.

  • sensu-resources.yaml (required)

    Valid Sensu Go resource definitions (e.g. checks, handlers, assets, etc), preferably in YAML format.

  • logo.png (required)

    Integration logo in PNG format.

  • README.md (required)

    Integration description and setup instructions (if required) in Markdown format (embedded HTML is not supported).

  • CHANGELOG.md (optional)

    Recommended but not currently used by the Sensu Catalog Browser (UI).

Sensu Integration YAML specification

---
api_version: catalog/v1
type: Integration 
metadata:
  namespace: sensu
  name: nginx-healthcheck
spec:
  class: "supported"
  provider: "agent/check"
  short_description: "NGINX monitoring"
  supported_platforms: 
  - linux
  - windows
  - darwin
  tags:
  - http
  - nginx
  - webserver 
  contributors:
  - @calebhailey 
  - @jspaleta 
  - @thoward 
 prompts:
  - var: check_name
    type: string
    prompt: "Check Name"
    default: nginx-healthcheck
  - var: url
    type: string
    prompt: "Default URL"
    default: "http://localhost:80/nginx_status"
  - var: interval
    type: int
    prompt: "How often do you want to check X?"
    default: 30
  resource_updates:
  - type: CheckConfig
    api_version: core/v2
    name: nginx-healthcheck
    fields:
    - name: metadata.name
      action: replace
      value: check_name
    - name: spec.interval
      action: replace
      value: interval
    - name: spec.command
      action: replace
      template: >-
        check-nginx-status.rb
        --url {{ .annotations.check_nginx_status_url | default "[[url]]" }}

Add some severity filtering examples

Handlers in Sensu Core offered some built-in severity filtering. This filtering is easily reproduced in Sensu Go using something like the following:

Only handle critical severity events:

---
type: EventFilter 
api_version: core/v2 
metadata:
  name: critical_severity_only
spec:
  action: allow
  expressions:
  - event.check.status == 2

Handle critical and unknown (status 3) events only:

---
type: EventFilter 
api_version: core/v2 
metadata:
  name: critical_severity_only
spec:
  action: allow
  expressions:
  - [2,3].includes(event.check.status)

Handle events that are not "OK" (0), "Warning" (1), or "Command not found" (127) status:

---
type: EventFilter
api_version: core/v2
metadata:
  name: filter_severities
spec: 
  action: allow
  expressions: 
  - ![0,1,127].includes(event.check.status)

This last example (and others like it) can be easily modified to meet almost any need from a severity filtering perspective. And the best part is these are portable and self-documenting solutions!

NOTE: I did not test these examples, so they should be considered as pseudo code (though they should all be pretty close to a finished product).

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.