Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
checkmk-formula
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
salt
checkmk-formula
Commits
94a83022
Commit
94a83022
authored
4 years ago
by
Dennis Ahrens
Browse files
Options
Downloads
Patches
Plain Diff
A little helper that notifies about remaining lib IDs
parent
e0d756fd
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+4
-0
4 additions, 0 deletions
README.md
checkmk/custom-files/local/remaining_library_ids
+5
-0
5 additions, 0 deletions
checkmk/custom-files/local/remaining_library_ids
checkmk/debian/remaining_library_ids
+7
-0
7 additions, 0 deletions
checkmk/debian/remaining_library_ids
with
16 additions
and
0 deletions
README.md
+
4
−
0
View file @
94a83022
...
...
@@ -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
This diff is collapsed.
Click to expand it.
checkmk/custom-files/local/remaining_library_ids
0 → 100644
+
5
−
0
View file @
94a83022
#!/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
This diff is collapsed.
Click to expand it.
checkmk/debian/remaining_library_ids
0 → 100644
+
7
−
0
View file @
94a83022
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment