Skip to content
Snippets Groups Projects
Commit 94a83022 authored by Dennis Ahrens's avatar Dennis Ahrens
Browse files

A little helper that notifies about remaining lib IDs

parent e0d756fd
No related branches found
No related tags found
No related merge requests found
......@@ -104,3 +104,7 @@ Installs the radsec plugin.
### `checkmk.debian.smart`
Installs the [smart.stats](https://checkmk.com/cms_check_smart.stats.html) agent plugin
### `checkmk.debian.remaining_library_ids`
Install a small local check that asks hshifo about remaining library ids - needs to run on pgdb
#!/bin/bash
REMAINNG = $(sudo -u postgres -- psql -qtAX -d hshinfo -c "select (maximum_value::bigint - (SELECT last_value FROM hshinfo.seq_raw_library_id)) from information_schema.sequences where sequence_schema = 'hshinfo' and sequence_name = 'seq_raw_library_id';")
echo "P remaining_library_ids=$REMAINING;400:;200: That many library IDs are available."
\ No newline at end of file
hsh_checkmk_library_ids_local:
file.managed:
- name: /usr/lib/check_mk_agent/local/remaining_library_ids
- source: salt://checkmk/custom-files/local/remaining_library_ids
- mode: 755
- user: root
- group: root
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment