Skip to content

Commit

Permalink
create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nedjitef committed Nov 25, 2021
1 parent 8e12c18 commit 947bbcb
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 5 deletions.
60 changes: 60 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# check_mk Plugin for Proxmox Backup Server
[![release](https://github.com/inettgmbh/checkmk-proxmox_backup_server/actions/workflows/release.yml/badge.svg)](https://github.com/inettgmbh/checkmk-proxmox_backup_server/actions/workflows/release.yml)

This check_mk extension adds checks Proxmox Backup Server:
* Datastore (Size, Usage)
* Garbage collection
* Verify jobs

## Warning
This extension is still work in progress and **produces a huge agent output**

## Installation
The mkp archive can be downloaded directly from the [release](https://github.com/inettgmbh/checkmk-proxmox_backup_server/releases/latest) and installed by following the [documentation of check_mk](https://docs.checkmk.com/latest/en/mkps.html).

## Building
Usually you don't see a section as how to build an mkp, because usually it's done like check_mk suggests using [WATO](https://docs.checkmk.com/latest/en/mkps.html#_creating_packages) or [CLI](https://docs.checkmk.com/latest/en/mkps.html#_creating_a_package).
But we made it easier and included two helper tools into this repository, that depend on the tool [python-mkp](https://github.com/inettgmbh/python-mkp), which is a fork of [tom-mi/python-mkp](https://github.com/tom-mi/python-mkp).
Unfortunally, the original tool, which can be installed using `pip` **cannot** be used because it wouldn't package some files.

### Requirements
* python-mkp

just run

```sh
$ build/mkp-pack
```

## Contributing

### issues, you can't fix / ideas, you can't implement

Use GitHub's [Issues](https://github.com/inettgmbh/checkmk-proxmox_backup_server/issues):
Try to explain as clear and short as possible.

### you want to write some code?

* Use Pull requests
* Sign off your commits
* Adapt to the coding style. Divert from it, if doing so increases readability.
* Don't check in IDE specific files or products of a build.

## Issues
yes, we have those
This extension 'works for us' right now, but it's far from optimal.

* Agent output is way to much and must be optimized
* Names of metrics should be changed

## TODOs
(even more, than issues)

* Check of sync jobs
* Check prune jobs
* Check tape jobs
* Check, if verify jobs are running
* Optimize parsing of agent output
* Add check parameters for timeouts of verify, garbage collection and prune jobs
* Move todos and issues to GitHub issues and projects (without being recursive)

5 changes: 5 additions & 0 deletions agent_based/proxmox_bs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Copyright (c) 2021 inett GmbH
# License: GNU General Public License v2
# A file is subject to the terms and conditions defined in the file LICENSE,
# which is part of this source code package.

from .agent_based_api.v1 import (
get_value_store,
register,
Expand Down
5 changes: 5 additions & 0 deletions agents/plugins/proxmox_bs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

# Copyright (c) 2021 inett GmbH
# License: GNU General Public License v2
# A file is subject to the terms and conditions defined in the file LICENSE,
# which is part of this source code package.

inpath() {
command -v "${1:?No command to test}" >/dev/null 2>&1
}
Expand Down
6 changes: 3 additions & 3 deletions info
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{'author': 'Maximilian Hill <mhill@inett.de>',
'description': 'https://github.com/inettgmbh/checkmk-proxmox_backup_server',
'download_url': 'https://github.com/inettgmbh/checkmk-proxmox_backup_server/releases',
'description': 'https://www.inett.de/it-loesungen/checkmk',
'download_url': 'https://github.com/inettgmbh/checkmk-proxmox_backup_server/releases/latest',
'files': {'agent_based': ['proxmox_bs.py'],
'agents': ['plugins/proxmox_bs'],
'lib': ['check_mk/base/cee/plugins/bakery/proxmox_bs.py'],
'web': ['plugins/wato/proxmox_bs.py']},
'name': 'proxmox_bs',
'num_files': 4,
'title': 'Proxmox Backup Server',
'version': '0.3.4',
'version': '0.3.5',
'version.min_required': '2.0.0',
'version.packaged': '2.0.0p3',
'version.usable_until': None}
6 changes: 6 additions & 0 deletions lib/check_mk/base/cee/plugins/bakery/proxmox_bs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/env python3
# -*- encoding: utf-8; py-indent-offset: 4 -*-

# Copyright (c) 2021 inett GmbH
# License: GNU General Public License v2
# A file is subject to the terms and conditions defined in the file LICENSE,
# which is part of this source code package.

import pprint
from pathlib import Path
from typing import Any, Dict
Expand Down
3 changes: 1 addition & 2 deletions web/plugins/wato/proxmox_bs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# -*- encoding: utf-8; py-indent-offset: 4 -*-

# Copyright (c) 2021 inett GmbH
# Maximilian Hill <mhill@inett.de>
# License: GNU General Public License v2
# A file is subject to the terms and conditions defined in the file COPYING,
# A file is subject to the terms and conditions defined in the file LICENSE,
# which is part of this source code package.

from cmk.gui.i18n import _
Expand Down

0 comments on commit 947bbcb

Please sign in to comment.