Improved Makefile and README.
This commit is contained in:
parent
3bcea8b559
commit
eec4bbbe4b
6
Makefile
6
Makefile
@ -1,7 +1,7 @@
|
|||||||
SRC_DIR := src/
|
SRC_DIR := src/
|
||||||
ALL_FOLDERS := $(sort $(shell find $(SRC_DIR) -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0))
|
ALL_FOLDERS := $(sort $(shell find $(SRC_DIR) -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0))
|
||||||
ALL_MODULES := $(sort $(subst $(SRC_DIR),,$(ALL_FOLDERS)))
|
ALL_MODULES := $(sort $(subst $(SRC_DIR),,$(ALL_FOLDERS)))
|
||||||
ALL_TARGETS := $(shell bin/findtargets.py build/ $(ALL_FOLDERS))
|
ALL_TARGETS := $(shell python3 bin/findtargets.py build/ $(ALL_FOLDERS))
|
||||||
|
|
||||||
all: $(ALL_TARGETS)
|
all: $(ALL_TARGETS)
|
||||||
|
|
||||||
@ -27,11 +27,11 @@ list:
|
|||||||
# setup
|
# setup
|
||||||
|
|
||||||
define make-targets
|
define make-targets
|
||||||
$(eval OUTPUT_FILE := $(shell bin/findtargets.py build/ $(SRC_DIR)$(1)))
|
$(eval OUTPUT_FILE := $(shell python3 bin/findtargets.py build/ $(SRC_DIR)$(1)))
|
||||||
|
|
||||||
$(OUTPUT_FILE): $(SRC_DIR)$(1) $(shell find $(SRC_DIR)$(1) -type f -print0 | xargs -0)
|
$(OUTPUT_FILE): $(SRC_DIR)$(1) $(shell find $(SRC_DIR)$(1) -type f -print0 | xargs -0)
|
||||||
@echo "Building $$@"
|
@echo "Building $$@"
|
||||||
@bin/makemkp.py $$< ./build/
|
@python3 bin/makemkp.py $$< ./build/
|
||||||
|
|
||||||
$(1): $(OUTPUT_FILE)
|
$(1): $(OUTPUT_FILE)
|
||||||
endef
|
endef
|
||||||
|
28
README.md
28
README.md
@ -1,3 +1,31 @@
|
|||||||
Check_MK Plugins
|
Check_MK Plugins
|
||||||
================
|
================
|
||||||
|
|
||||||
|
This is a collection of plugins for the [Check_MK Monitoring system](http://mathias-kettner.com/check_mk.html)
|
||||||
|
that I wrote.
|
||||||
|
|
||||||
|
|
||||||
|
Building
|
||||||
|
--------
|
||||||
|
|
||||||
|
To build all the plugins, clone this repository and run:
|
||||||
|
|
||||||
|
make all
|
||||||
|
|
||||||
|
(Make sure to have Python3 installed.)
|
||||||
|
|
||||||
|
You can also build a single plugin, e.g.:
|
||||||
|
|
||||||
|
make check_hls
|
||||||
|
|
||||||
|
The files (*.mkp) will be written into the `build/` directory.
|
||||||
|
|
||||||
|
|
||||||
|
Installing
|
||||||
|
----------
|
||||||
|
|
||||||
|
SSH into your Check_MK machine, change to the user of the site you want to install the plugin,
|
||||||
|
then run:
|
||||||
|
|
||||||
|
mkp install /path/to/plugin.mkp
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user