coshsh


Namecoshsh JSON
Version 10.1 PyPI version JSON
download
home_pagehttp://github.com/lausser/coshsh
SummaryCoshsh - config generator for monitoring systems
upload_time2024-02-14 16:37:10
maintainer
docs_urlNone
authorGerhard Lausser
requires_python
licenseAGPLv3
keywords nagios icinga naemon shinken prometheus monitoring
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # 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.
* The city of Munich. https://bit.ly/2QhNCOJ
* 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.

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](http://www.consol.de/open-source-monitoring/support)

## Changelog

The changelog is available on
[github](https://github.com/lausser/coshsh/blob/master/Changelog)

## 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:

```python
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](https://coveralls.io/repos/github/lausser/coshsh/badge.svg?branch=master)](https://coveralls.io/github/lausser/coshsh?branch=master)

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/lausser/coshsh",
    "name": "coshsh",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "nagios,icinga,naemon,shinken,prometheus,monitoring",
    "author": "Gerhard Lausser",
    "author_email": "gerhard.lausser@consol.de",
    "download_url": "https://files.pythonhosted.org/packages/ea/b0/217c6c0bde7119c064866e33db80ebf814bbd5bcd12957153883831033f4/coshsh-10.1.tar.gz",
    "platform": null,
    "description": "# coshsh Config-Generator for Shinken / Nagios /Icinga\n\n## What is coshsh?\n\nCoshsh is a framework which helps you producing configuration files for open source monitoring systems.\n\n## Features\n\n* coshsh is very fast. (~60000 services in 10 seconds)\n* coshsh can be extended easily.\n* coshsh reads only hosts and applications. Services are added later.\n\n## Why should you use it?\nBecause others use it too.\n* The city of Munich. https://bit.ly/2QhNCOJ\n* A car manufacturer in Munich with three letters. \n* A global storage company with three letters. (they were bought and now have four letters)\n* Lidl/Kaufland. https://bit.ly/2L459nH\n* A chinese car manufacturer in Shenyang.\n* An austrian company producing crystal products.\n* A world-wide operating consulting firm.\n* A venerable hanseatic bank.\n\nand many more companies which eliminated manual tasks in monitoring.\n\n## Download\n\nhttp://labs.consol.de/nagios/coshsh\n\n## Support\n\nProfessional support and consulting is available via [www.consol.de](http://www.consol.de/open-source-monitoring/support)\n\n## Changelog\n\nThe changelog is available on\n[github](https://github.com/lausser/coshsh/blob/master/Changelog)\n\n## How does it work\n\ncoshsh 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.\n\n\nIn 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.  \nThe only thing he knows is name, address and model of his new server and the applications he installed.  \n\nFor 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:\n\n```python\nimport coshsh\n\ndef __mi_ident__(params={}):\n    if coshsh.util.compare_attr(\"type\", params, \".*windows.*\"):\n        return Windows\n\n\nclass Windows(coshsh.application.Application):\n    template_rules = [\n        coshsh.templaterule.TemplateRule(needsattr=None,\n            template=\"os_windows_default\"),\n        coshsh.templaterule.TemplateRule(needsattr=\"filesystems\",\n            template=\"os_windows_fs\"),\n    ]\n```\n\nThe 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)\nThe only thing you need to know is the relationship between an application's class and some template files. Like this one here:\n\n```\n{{ application|service(\"os_windows_default_check_nsclient\") }}\n  host_name                       {{ application.host_name }}\n  use                             os_windows_default\n  check_command                   check_nrpe_arg!60!checkUpTime!MinWarn=5m MinCrit=1m\n}\n\n{{ application|service(\"os_windows_default_check_cpu\") }}\n  host_name                       {{ application.host_name }}\n  use                             os_windows_default,srv-pnp\n  max_check_attempts              10\n  check_command                   check_nrpe_arg!60!checkCPU!warn=80 crit=90 time=5m time=1m time=30s\n}\n\n{{ application|service(\"os_windows_default_check_mem\") }}\n  host_name                       {{ application.host_name }}\n  use                             os_windows_default,srv-pnp\n  check_command                   check_nrpe_arg!60!checkMem!MaxWarn=80% MaxCrit=90% ShowAll=long type=physical type=virtual type=paged\n}\n\n{{ application|service(\"os_windows_default_check_autosvc\") }}\n  host_name                       {{ application.host_name }}\n  use                             os_windows_default\n  check_command                   check_nrpe_arg!60!CheckServiceState!CheckAll\n}\n\n{#\n{{ application|service(\"os_windows_default_check_ntp\") }}\n  host_name                       {{ application.host_name }}\n  use                             os_windows_default\n  check_command                   windows-check_time!3600!360000\n}\n#}\n\ndefine servicedependency {\n  name                             dependency_os_windows_default_check_nsclient_uc_{{ application.host_name }}\n  host_name                        {{ application.host_name }}\n  service_description              os_windows_default_check_nsclient\n  execution_failure_criteria       u,c\n  notification_failure_criteria    u,c\n  dependent_service_description    os_windows_.*,\\\n                                   !os_windows_default_check_nsclient\n}\n```\n\nOnly a nagios admin will ever see these template files and will have to edit them.\n\n[![Coverage Status](https://coveralls.io/repos/github/lausser/coshsh/badge.svg?branch=master)](https://coveralls.io/github/lausser/coshsh?branch=master)\n",
    "bugtrack_url": null,
    "license": "AGPLv3",
    "summary": "Coshsh - config generator for monitoring systems",
    "version": "10.1",
    "project_urls": {
        "Homepage": "http://github.com/lausser/coshsh"
    },
    "split_keywords": [
        "nagios",
        "icinga",
        "naemon",
        "shinken",
        "prometheus",
        "monitoring"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "894f69ee370c8083a3dbcfe311069932bb22dd55c71dbce197c19b6c29bce55f",
                "md5": "cf4c29b1ef2e352f439cf5f4e2fb43bd",
                "sha256": "56edfca9e0a1179cd2257d917c6f94e5f2ecfd8ce43671991a8c08825669bff8"
            },
            "downloads": -1,
            "filename": "coshsh-10.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cf4c29b1ef2e352f439cf5f4e2fb43bd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 74278,
            "upload_time": "2024-02-14T16:37:07",
            "upload_time_iso_8601": "2024-02-14T16:37:07.911216Z",
            "url": "https://files.pythonhosted.org/packages/89/4f/69ee370c8083a3dbcfe311069932bb22dd55c71dbce197c19b6c29bce55f/coshsh-10.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eab0217c6c0bde7119c064866e33db80ebf814bbd5bcd12957153883831033f4",
                "md5": "b482b09c1a4cee3ace6060c7504d8d14",
                "sha256": "a28d6f6c0b214d85187b8c65bcb04e3e6fef5bd46cce0866ec6cf0aaf91ea38b"
            },
            "downloads": -1,
            "filename": "coshsh-10.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b482b09c1a4cee3ace6060c7504d8d14",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 18042854,
            "upload_time": "2024-02-14T16:37:10",
            "upload_time_iso_8601": "2024-02-14T16:37:10.972409Z",
            "url": "https://files.pythonhosted.org/packages/ea/b0/217c6c0bde7119c064866e33db80ebf814bbd5bcd12957153883831033f4/coshsh-10.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-14 16:37:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lausser",
    "github_project": "coshsh",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "coshsh"
}
        
Elapsed time: 0.20218s