Skip to content

Commit

Permalink
Some tiny changes:
Browse files Browse the repository at this point in the history
* Removed all historical checks from postinst and postrm
* Removed file extension from get script
* Changed file names to match the other zabbix-check packages
  • Loading branch information
imolein committed Jan 12, 2021
1 parent 411edc4 commit cd41455
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 32 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ New BSD License/BSD 3-Clause License (see [debian/copyright](debian/copyright))

## Template for the Zabbix frontend

A template for the Zabbix frontend can be found, as usual in our packages, in [/usr/share/doc/${package_name}/](usr/share/doc/zabbix-check-ksm/)
A template for the Zabbix frontend can be found, as usual in our packages, in [/usr/share/doc/examples/${package_name}/](examples/)
8 changes: 8 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
zabbix-check-ksm (1:1.4) focal; urgency=low

* Removed all historical checks from postinst and postrm
* Removed file extension from get script
* Changed file names to match the other zabbix-check packages

-- Sebastian Huebner <sebastian@hueb-ner.de> Tue, 12 Jan 2021 21:03:15 +0100

zabbix-check-ksm (1:1.3) xenial; urgency=low

[ cbricart ]
Expand Down
2 changes: 1 addition & 1 deletion debian/compat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7
9
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Package: zabbix-check-ksm
Architecture: all
Pre-Depends: zabbix-agent
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: KSM monitoring script for zabbix
Description: KSM monitoring script for zabbix-agent
Provides a script, to monitore the KSM (Kernel Samepage Merging).
4 changes: 2 additions & 2 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/

Files: *
Copyright: 2020 Sebastian Huebner <sebastian@hueb-ner.de>
Copyright: 2021 Sebastian Huebner <sebastian@hueb-ner.de>
License: BSD-3-clause
Copyright (c) 2020 Sebastian Huebner. All rights reserved.
Copyright (c) 2021 Sebastian Huebner. All rights reserved.
.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down
22 changes: 2 additions & 20 deletions debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,13 @@

case "$1" in
configure)
# Standartcheck ob Konfig Ordner existiert und
# in der zabbix konfig richtig steht
# beginn
conf_file="/etc/zabbix/zabbix_agentd.conf"
confd_path="/etc/zabbix/zabbix_agentd.d/"
include_line="Include=$confd_path"

if [ ! -d $confd_path ]; then
mkdir $confd_path
fi

if [ "$(cat $conf_file | egrep "^#\s*${include_line}$" | wc -l)" -ge "1" ]; then
sed -i "s%^#\s*${include_line}$%${include_line}%g" $conf_file
elif [ "$(cat $conf_file | egrep "^${include_line}$" | wc -l)" -eq "0" ]; then
sed -i "/^#\s*Include=$/a $include_line" $conf_file
fi
# end

if [ "$(cat /sys/kernel/mm/ksm/run)" -ne "1" ]; then
echo "!!! KSM not active !!!"
fi

if which systemctl >/dev/null 2>&1; then
if command -v systemctl >/dev/null 2>&1; then
deb-systemd-invoke restart zabbix-agent.service || true
elif which invoke-rc.d >/dev/null 2>&1; then
elif command -v invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d zabbix-agent stop || true
invoke-rc.d zabbix-agent start || true
else
Expand Down
1 change: 1 addition & 0 deletions debian/zabbix-check-ksm.examples
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
examples/zabbix-check-ksm-template.xml
8 changes: 2 additions & 6 deletions debian/zabbix-check-ksm.install
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
etc
etc/zabbix
etc/zabbix/zabbix_agentd.d
etc/zabbix/zabbix_agentd.d/userparameter_ksm.conf
etc/zabbix/zabbix_agentd.d/zabbix-check-ksm.conf
usr
usr/lib
usr/lib/zabbix-check
usr/lib/zabbix-check/bin
usr/lib/zabbix-check/bin/zabbix-check-ksm.sh
usr/share
usr/share/doc
usr/share/doc/zabbix-check-ksm
usr/share/doc/zabbix-check-ksm/zabbix_check_ksm_template.xml
usr/lib/zabbix-check/bin/zabbix-check-ksm
1 change: 0 additions & 1 deletion etc/zabbix/zabbix_agentd.d/userparameter_ksm.conf

This file was deleted.

1 change: 1 addition & 0 deletions etc/zabbix/zabbix_agentd.d/zabbix-check-ksm.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UserParameter=ksm[*],/usr/lib/zabbix-check/bin/zabbix-check-ksm $1
File renamed without changes.
File renamed without changes.

0 comments on commit cd41455

Please sign in to comment.