Skip to main content

coshsh Config-Generator for Shinken / Nagios /Icinga

What is coshsh?

Coshsh is a framework which helps you producing configuration files for open source monitoring systems.

Features

  • coshsh is very fast. (~60000 services in 10 seconds)
  • coshsh can be extended easily.
  • coshsh reads only hosts and applications. Services are added later.

Why should you use it?

Because others use it too.

  • Schwarz Digits. https://short.do/FJs2L2
  • A car manufacturer in Munich with three letters.
  • A global storage company with three letters. (they were bought and now have four letters)
  • Lidl/Kaufland. https://bit.ly/2L459nH
  • A chinese car manufacturer in Shenyang.
  • An austrian company producing crystal products.
  • A world-wide operating consulting firm.
  • A venerable hanseatic bank.
  • The city of Munich. https://bit.ly/2QhNCOJ

and many more companies which eliminated manual tasks in monitoring.

Download

http://labs.consol.de/nagios/coshsh

Support

Professional support and consulting is available via www.consol.de

Changelog

The changelog is available on github

How does it work

coshsh reads one or many datasources (which can be files, databases, ldap...) and transforms their contents into host/service/contact-configuration files. Host- and service-definitions are created by filling placeholders in template-files.

In the beginning there are hosts and applications. There are no host and service definitions. Why? Because your server admins don't care about. Your windows admin simply wants to enter his new machine in a cmdb. He has no time to configure check_periods or commands or services. He even doesn't want to know what it is.
The only thing he knows is name, address and model of his new server and the applications he installed.

For example, your datasource is a database table with a column names "type". If you want to handle a value of "windows" or "windows 2008" all you need is a class file for it:

import coshsh

def __mi_ident__(params={}):
    if coshsh.util.compare_attr("type", params, ".*windows.*"):
        return Windows


class Windows(coshsh.application.Application):
    template_rules = [
        coshsh.templaterule.TemplateRule(needsattr=None,
            template="os_windows_default"),
        coshsh.templaterule.TemplateRule(needsattr="filesystems",
            template="os_windows_fs"),
    ]

The class file will be automatically registered to coshsh. Now whenever a record of type "windows" comes out of your datasource, an object of class Windows is created. (Inside coshsh. You actually won't notice it and you don't have to know about it) The only thing you need to know is the relationship between an application's class and some template files. Like this one here:

{{ application|service("os_windows_default_check_nsclient") }}
  host_name                       {{ application.host_name }}
  use                             os_windows_default
  check_command                   check_nrpe_arg!60!checkUpTime!MinWarn=5m MinCrit=1m
}

{{ application|service("os_windows_default_check_cpu") }}
  host_name                       {{ application.host_name }}
  use                             os_windows_default,srv-pnp
  max_check_attempts              10
  check_command                   check_nrpe_arg!60!checkCPU!warn=80 crit=90 time=5m time=1m time=30s
}

{{ application|service("os_windows_default_check_mem") }}
  host_name                       {{ application.host_name }}
  use                             os_windows_default,srv-pnp
  check_command                   check_nrpe_arg!60!checkMem!MaxWarn=80% MaxCrit=90% ShowAll=long type=physical type=virtual type=paged
}

{{ application|service("os_windows_default_check_autosvc") }}
  host_name                       {{ application.host_name }}
  use                             os_windows_default
  check_command                   check_nrpe_arg!60!CheckServiceState!CheckAll
}

{#
{{ application|service("os_windows_default_check_ntp") }}
  host_name                       {{ application.host_name }}
  use                             os_windows_default
  check_command                   windows-check_time!3600!360000
}
#}

define servicedependency {
  name                             dependency_os_windows_default_check_nsclient_uc_{{ application.host_name }}
  host_name                        {{ application.host_name }}
  service_description              os_windows_default_check_nsclient
  execution_failure_criteria       u,c
  notification_failure_criteria    u,c
  dependent_service_description    os_windows_.*,\
                                   !os_windows_default_check_nsclient
}

Only a nagios admin will ever see these template files and will have to edit them.

Coverage Status

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coshsh-13.1.tar.gz (232.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coshsh-13.1-py3-none-any.whl (135.7 kB view details)

Uploaded Python 3

File details

Details for the file coshsh-13.1.tar.gz.

File metadata

  • Download URL: coshsh-13.1.tar.gz
  • Upload date:
  • Size: 232.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for coshsh-13.1.tar.gz
Algorithm Hash digest
SHA256 8b320d573657ca6588eeb07b12cb229f791b890887491206e365be83ada6cdd8
MD5 ba2dc5060e27e52cce1eacf7e79250e5
BLAKE2b-256 f857889d2ee1b2c4b72e04f4e0894773e87486640a7762ed4dc11f23a22fba80

See more details on using hashes here.

File details

Details for the file coshsh-13.1-py3-none-any.whl.

File metadata

  • Download URL: coshsh-13.1-py3-none-any.whl
  • Upload date:
  • Size: 135.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for coshsh-13.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b86ba5d770d8e4b555bd691c8e72f1322166a46b7895ec1a707b13523c43667
MD5 6a01062dc503d77f3b6ee40433493596
BLAKE2b-256 0d146c25dfde939ddde37c829dee2aae98f48950ca3fb878f8557c101c50b17d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

13.1 This release

2 files

13.0

2 files

11.1

2 files

11.0

2 files

10.2.3

2 files

10.1

2 files

10.0.0.5

2 files

10.0.0.4

2 files

10.0.0.3

2 files

10.0

2 files

3.6.1

1 file

3.6.0.1

1 file

3.6

1 file

3.2.6

1 file

3.2.5

1 file

3.2.4.3

1 file

3.2.3

1 file

3.2.2

1 file

3.2.1

1 file

3.2

1 file

3.1.2

1 file

3.1.1

1 file

3.1

1 file

3.0.3

1 file

3.0.1

1 file

3.0

1 file

2.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page