Zabbix configuration unclear #936

Open
opened 2024-11-14 16:53:11 +00:00 by powerriegel · 9 comments

What I'm trying to do and why

I want to monitor it using Zabbix but it's not really clear how to configure the items on the zabbix server after adding the config section to borgmatic with API token.

I actually don't know what Zabbix server version we're using. I'm just a user on that system.

I've tried to add an item with the same key using the Zabbix GUI. But that key never receives any data and I can't even test it. Testing works usually with Zabbix agents keys.

Can you point me to the right direction, please?

Steps to reproduce

No response

Actual behavior

No response

Expected behavior

No response

Other notes / implementation ideas

No response

borgmatic version

1.9.1

borgmatic installation method

pipx

Borg version

1.2.4

Python version

3.11.2

Database version (if applicable)

No response

Operating system and version

Debian 12

### What I'm trying to do and why I want to monitor it using Zabbix but it's not really clear how to configure the items on the zabbix server after adding the config section to borgmatic with API token. I actually don't know what Zabbix server version we're using. I'm just a user on that system. I've tried to add an item with the same key using the Zabbix GUI. But that key never receives any data and I can't even test it. Testing works usually with Zabbix agents keys. Can you point me to the right direction, please? ### Steps to reproduce _No response_ ### Actual behavior _No response_ ### Expected behavior _No response_ ### Other notes / implementation ideas _No response_ ### borgmatic version 1.9.1 ### borgmatic installation method pipx ### Borg version 1.2.4 ### Python version 3.11.2 ### Database version (if applicable) _No response_ ### Operating system and version Debian 12
witten added the
question / support
label 2024-11-14 17:35:05 +00:00
Owner

I've pinged our resident Zabbix expert, who will hopefully weigh in on this when he gets the chance. Thanks for your patience!

I've pinged our resident Zabbix expert, who will hopefully weigh in on this when he gets the chance. Thanks for your patience!

Hi @powerriegel . Thanks for trying out the new feature. I'm here to help you get this working. First thing to check is if you are running Zabbix 7.0.

7.0 was the first version that enabled updating items via the API.

In the web interface, on the left nav bar, hover over Help. You should see the link for the documentation site. In that link, will be the version number.

Hi @powerriegel . Thanks for trying out the new feature. I'm here to help you get this working. First thing to check is if you are running Zabbix 7.0. 7.0 was the first version that enabled updating items via the API. In the web interface, on the left nav bar, hover over **Help**. You should see the link for the documentation site. In that link, will be the version number.
Author

Unfortunately, we're using Zabbix 6.0. What would be the best way to monitor the backups then?

Unfortunately, we're using Zabbix 6.0. What would be the best way to monitor the backups then?

@powerriegel you can always use zabbix_sender.

Here is an example:

after_backup:
    - zabbix_sender -z zabbix-ip -s "hostname" -k key-to-update -o value

on_error:
    - zabbix_sender -z zabbix-ip -s "hostname" -k key-to-update -o value
@powerriegel you can always use `zabbix_sender`. Here is an example: ```yaml after_backup: - zabbix_sender -z zabbix-ip -s "hostname" -k key-to-update -o value on_error: - zabbix_sender -z zabbix-ip -s "hostname" -k key-to-update -o value ```
Author

What kind of programm is zabbix_sender
/bin/sh: 1: zabbix_sender: not found
/etc/borgmatic.d/local.yaml: Error running on-error hook

What kind of programm is `zabbix_sender` /bin/sh: 1: zabbix_sender: not found /etc/borgmatic.d/local.yaml: Error running on-error hook

@powerriegel you will need to install zabbix_sender.

Try: sudo apt install zabbix-sender since you are using Debian.

zabbix_sender is a command line utility to send data to Zabbix items. The 1.9.0 changes remove the need for this since we can use the new 7.0 API.

Since you are on 6.0 you need to use zabbix_sender

@powerriegel you will need to install `zabbix_sender`. Try: `sudo apt install zabbix-sender` since you are using Debian. `zabbix_sender` is a command line utility to send data to Zabbix items. The 1.9.0 changes remove the need for this since we can use the new 7.0 API. Since you are on 6.0 you need to use `zabbix_sender`

I have zabbix 7.0.6 but the documentation is not clear, I can not find the Type of item to create in zabbix to use with borgmatic.
For example if I choose zabbix_agent for the Type after I have the error that the item is not supported.
I have to create a template to use for this scope and even on the template I still have to associate the item to one type or associated the item.key at the agent like any other local script?

I have zabbix 7.0.6 but the documentation is not clear, I can not find the Type of item to create in zabbix to use with borgmatic. For example if I choose zabbix_agent for the Type after I have the error that the item is not supported. I have to create a template to use for this scope and even on the template I still have to associate the item to one type or associated the item.key at the agent like any other local script?

I am apologize, I find the way on my own just after post on this issue. I can use a Trapper items.
I share the image of configuration, so please let me know if this is the expected way to do:

I am apologize, I find the way on my own just after post on this issue. I can use a Trapper items. I share the image of configuration, so please let me know if this is the expected way to do:

@vot4anto thanks for sharing. I will make a pull request to improve documentation

@vot4anto thanks for sharing. I will make a pull request to improve documentation
Sign in to join this conversation.
No Milestone
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#936
No description provided.