Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UNKOWN - can not get data from borgmatic! #1

Open
Banzai292 opened this issue Mar 25, 2021 · 1 comment
Open

UNKOWN - can not get data from borgmatic! #1

Banzai292 opened this issue Mar 25, 2021 · 1 comment

Comments

@Banzai292
Copy link

Hello,

This message comes when querying via NRPE from the Nagios server.

nagios-server$>/usr/local/nagios/libexec/check_nrpe -H mdtreplicat.moderndrive.com -c check_borgmatic
UNKOWN - can not get data from borgmatic!

The call on the client (with or without sudo):

client$>/usr/lib/nagios/plugins/check_borgmatic.py -w 86400 -c 185400
CRITICAL - last borgmatic backup: 2021-03-19 11:36:52 (age: 6 ....

Other NRPE calls work:

nagios-server$>/usr/local/nagios/libexec/check_nrpe -H mdtreplicat.moderndrive.com -c check_disk
DISK OK - free space: /var/tmp 557199 MB (61% inode=99 ....

nrpe.cfg:

:
command[check_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/md2
command[check_borgmatic]=/usr/lib/nagios/plugins/check_borgmatic.py
command[check_swap]=/usr/lib/nagios/plugins/check_swap -w 20% -c 10%
:

A change to:

:
command[check_borgmatic]=/usr/bin/sudo /usr/lib/nagios/plugins/check_borgmatic.py
:

results in

NRPE: Unable to read output

/etc/sudoers.d/nagios_borgmatic:
nagios ALL= NOPASSWD:/usr/local/bin/borgmatic --list --successful --last 1 --json

I also tried the --nagios option with no success!

@chris2k20
Copy link
Owner

chris2k20 commented Apr 26, 2021

Hi,

thanks for your feedback. And Sorry for the Late Reply..

Anyway, the check_borgmatic seems to run as it should in your local shell. In the output it says "Critical" last backup is 6 days old, so borgmatic can read the data?!

client$>/usr/lib/nagios/plugins/check_borgmatic.py -w 86400 -c 185400
CRITICAL - **last borgmatic backup: 2021-03-19 11:36:52** (age: 6 ....

Which OS is running on your client? Debian/Ubuntu/CentOS?

Can you please run sudo borgmatic --list --successful --last 1 --json with your nagios user on the client and post the output?

Best regards,
Chris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants