lp:~guoqiao/charm-nrpe

Owned by Joe Guo
Get this repository:
git clone https://git.launchpad.net/~guoqiao/charm-nrpe
Only Joe Guo can upload to this repository. If you are Joe Guo please log in for upload directions.

Branches

Name Last Modified Last Commit
check_reboot_fix 2022-02-17 00:31:19 UTC
ignore .unit-state.db

Author: Joe Guo
Author Date: 2022-02-17 00:31:19 UTC

ignore .unit-state.db

check_reboot 2022-02-14 05:17:18 UTC
add tests for check_reboot

Author: Joe Guo
Author Date: 2022-02-08 03:40:23 UTC

add tests for check_reboot

add-update-status-hook 2021-10-07 06:07:26 UTC
add missing update-status hook with python script

Author: Joe Guo
Author Date: 2021-10-06 05:03:26 UTC

add missing update-status hook with python script

status message is identical to what was defined in services.py.

LP1915106-skip-unfound-ifaces 2021-02-22 02:55:25 UTC
add --skip-unfound-ifaces to check_netlinks.py

Author: Joe Guo
Author Date: 2021-02-22 02:44:51 UTC

add --skip-unfound-ifaces to check_netlinks.py

Add an new boolean option `netlinks_skip_unfound_ifaces` in config.yaml.
When True, add --skip-unfound-ifaces to check_netlinks.py.

LP: #1915106

Signed-off-by: Joe Guo <joe.guo@canonical.com>

LP1906991-chown-nagios-dirs 2021-02-05 05:31:34 UTC
nrpe_utils.py: ensure permission for /var/lib/nagios

Author: Joe Guo
Author Date: 2021-02-05 05:31:34 UTC

nrpe_utils.py: ensure permission for /var/lib/nagios

This nrpe charm will install nagios-nrpe-server deb package.
In its preinst script[0], it will add nagios user and create `/var/lib/nagios` as home dir.

When other charm like hw-health relates to this charm, they will:

1) setup cronjob to run script
2) generate output file into /var/lib/nagios
3) read output file from /var/lib/nagios

Before, these are all done via root user, so no permission issue.
But recently, the cronjob user is switched from root to nagios, which caused following issues:

1) original output file was created by root, cronjob script by nagios user can not write to it.
2) In some situation, owner of `/var/lib/nagios/` is changed to root, cronjob script can not write file into this dir.

related bugs:

LP: #1906991
LP: #1904045
LP: #1866382

In this patch, we:

1) ensure `/var/lib/nagios` is owned by nagios user
2) setgid on dir group, to ensure any new created file in `/var/lib/nagios` has group `nagios`.

NOTE: this patch avoids to chown recursively, which implies, if there is a legacy output file
owned by root, we have to fix it manually, or fix it from the related charm side.

[0]: https://git.launchpad.net/ubuntu/+source/nagios-nrpe/tree/debian/nagios-nrpe-server.preinst#n28

Signed-off-by: Joe Guo <joe.guo@canonical.com>

LP1902940-python-not-found 2021-02-01 21:16:41 UTC
check_status_file.py: fix python shebang

Author: Joe Guo
Author Date: 2021-02-01 21:16:41 UTC

check_status_file.py: fix python shebang

On focal, `/usr/bin/python` doesn't exist by default any more.
Change shebang: `/usr/bin/python` -> `/usr/bin/env python3`

Signed-off-by: Joe Guo <joe.guo@canonical.com>

fix_yaml_load_warning 2020-01-29 21:46:03 UTC
hooks/nrpe_helpers.py: fix yaml.load warning

Author: Joe Guo
Author Date: 2020-01-29 21:46:03 UTC

hooks/nrpe_helpers.py: fix yaml.load warning

use yaml.load without Loader param is unsafe and will show a warning in log:
https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

Add Fullloader param to mute the warning.

Signed-off-by: Joe Guo <joe.guo@canonical.com>

17 of 7 results
This repository contains Public information 
Everyone can see this information.

Subscribers