Zabbix template

Hey
how can I disable tracking of vm machines?
If you don't want to monitor guests (so VMs and LXCs) at all you can use the regex value .* for the macro {$PVE_IGNORE_ID}.
If you just want to monitor your LXCs but no VMs, you would need to block all the IDs of all VMs using the macro {$PVE_IGNORE_ID} too. Easiest would be if you give all your VMs a VMID of 2000-2999 and all LXCs a VMID of 1000-1999. That way you could block the complete VMID range of all VM with a value like ^2[0-9][0-9][0-9]$ instead of blocking all individual VMIDs like for example ^(102|103|105|106|107|108|109|110|111|113|115|116|117|118|119|120|122|123|124|125|134)$.

Most of my guests are VMs, so it was easier to me to just whitelist the few LXCs that I want to monitor, so I first blocked all guests by using {$PVE_IGNORE_ID} = .* and then I whitelisted the LXCs like this {$PVE_FORCE_ID} = ^(100|101|121|126|133)$
 
Last edited:
  • Like
Reactions: oguz
If you don't want to monitor guests (so VMs and LXCs) at all you can use the regex value .* for the macro {$PVE_IGNORE_ID}.
If you just want to monitor your LXCs but no VMs, you would need to block all the IDs of all VMs using the macro {$PVE_IGNORE_ID} too. Easiest would be if you give all your VMs a VMID of 2000-2999 and all LXCs a VMID of 1000-1999. That way you could block the complete VMID range of all VM with a value like 2[0-9][0-9][0-9] instead of blocking all individual VMIDs like for example ^(102|103|105|106|107|108|109|110|111|113|115|116|117|118|119|120|122|123|124|125|134)$.

Most of my guests are VMs, so it was easier to me to just whitelist the few LXCs that I want to monitor, so I first blocked all guests by using {$PVE_IGNORE_ID} = .* and then I whitelisted the LXCs like this {$PVE_FORCE_ID} = ^(100|101|121|126|133)$
I added "*" but the vm information keeps showing. Am I doing something wrong?
 

Attachments

  • zab.JPG
    zab.JPG
    71.2 KB · Views: 74
I added "*" but the vm information keeps showing. Am I doing something wrong?
A ".*" should be fine. But keep in mind that these filters will only prevent the template from discovering. If you already discovered all the VMs they will continue to be monitored. So in order to really make use of it you need to remove the template first from your host (Configuration -> Hosts -> YourHostsName -> Templates -> right side of "Proxmox VE by HTTP" click the "unlink and clear" and then click the "update" button) and add the template again afterwards.
 
Last edited:
  • Like
Reactions: Kosh
A ".*" should be fine. But keep in mind that this filters will only prevent the template from discovering. If you already discovered all the VMs they will continue to be monitored. So in order to really make use of it you need to remove the template first from your host (Configuration -> Hosts -> YourHostsName -> Templates -> right side of "Proxmox VE by HTTP" click the "unlink and clear" and then click the "update" button) and add the template again afterwards.
Thank you
 
Hi
template from "vashvampir" can't monitor lvm /zfs storage where vm is located? or am I doing something wrong?
 
I'Ve upgraded to Zabbix 6.0 LTS and looks there are some new problems:
1.) looks like used RAM/Storage percentage are now wrong. For example instead of a 30% I now see 0.3019 %. I think the numbers would be right after multiplying with 100 and rounding.
2.) Its hard to view the PVE statistics because there is no "Application" filter in the "see latest results" anymore. Previously I would select there "PVE ct" if I wanted to see LXC statistics. That is now gone and I need to filter results by "Tag" and looks like your template isn't using tags.
 
Last edited:
Hi all! I apologize, I did not appear here at first because of the coronovirus, and then because I was sent on a "business trip" to the border of Russia and Ukraine (these are the disadvantages of working as a system administrator for the government of the country)...
Hi
template from "vashvampir" can't monitor lvm /zfs storage where vm is located? or am I doing something wrong?
The template should monitor zfs using autodiscovery. Can you screenshot the pve storage discovery items?

Hi all,
@vashvampir great work.
I have question - some lxc's has got additional disk (mount point), how to monitor usage of this disk ?

Wojtek
This requires the template to be modified. Thanks for the feedback, I'll try to implement detection not only of the container system disk.

I'Ve upgraded to Zabbix 6.0 LTS and looks there are some new problems:
1.) looks like used RAM/Storage percentage are now wrong. For example instead of a 30% I now see 0.3019 %. I think the numbers would be right after multiplying with 100 and rounding.
2.) Its hard to view the PVE statistics because there is no "Application" filter in the "see latest results" anymore. Previously I would select there "PVE ct" if I wanted to see LXC statistics. That is now gone and I need to filter results by "Tag" and looks like your template isn't using tags.
This requires the refinement of the template for Zabbix 6. As soon as we switch to the new version at work, I will remake it.
The template does not use tags, I will add it soon. Probably combined with a rework for fresh Zabbix.

By the way, now my git is unavailable, I will raise it tomorrow. Will be available at the new address https://git.ismv.ru
 
Last edited:
  • Like
Reactions: galentx and Dunuin
I'Ve upgraded to Zabbix 6.0 LTS and looks there are some new problems:
1.) looks like used RAM/Storage percentage are now wrong. For example instead of a 30% I now see 0.3019 %. I think the numbers would be right after multiplying with 100 and rounding.
2.) Its hard to view the PVE statistics because there is no "Application" filter in the "see latest results" anymore. Previously I would select there "PVE ct" if I wanted to see LXC statistics. That is now gone and I need to filter results by "Tag" and looks like your template isn't using tags.
The implementation of Zabbix 6 and Proxmox Backup Server is planned at my work for the end of March - beginning of April. Then I will start adapting the template for fresh Zabbix and will make the template for PBS

How long the update will take - I can’t say for sure yet, it’s very difficult to guess what will go wrong when updating Zabbix, which monitors about 15k virtual machines
 
Last edited:
How are people monitoring CEPH on their proxmox clusters? The default "Ceph by Zabbix Agent 2" quickly goes "unsupported" when added to a PMX host.
 
Tried it but looks like only the "PBS: version" and "PBS: API ping" can be monitored. "PBS: Node status" shows the error "Response code "403" did not match any of the required status codes "200"". But when I look at the URL of the item and put my macros in that URL and open the URL in my browser I get this:
Code:
{"data":{"cpu":0.013017751479289963,"cpuinfo":{"cpus":3,"model":"Intel(R) Xeon(R) CPU E3-1230 v3 @ 3.30GHz","sockets":1},"info":{"fingerprint":"xx:xx:xx:xx:xx:xx:xx"},"kversion":"Linux 5.15.39-4-pve #1 SMP PVE 5.15.39-4 (Mon, 08 Aug 2022 15:11:15 +0200)","loadavg":[0.01,0.0,0.0],"memory":{"free":1058140160,"total":2071568384,"used":1013428224},"root":{"avail":24949886976,"total":33105428480,"used":6447726592},"swap":{"free":4292866048,"total":4292866048,"used":0},"uptime":537764,"wait":0.0}}
 
Last edited:
Tried it but looks like only the "PBS: version" and "PBS: API ping" can be monitored. "PBS: Node status" shows the error "Response code "403" did not match any of the required status codes "200"". But when I look at the URL of the item and put my macros in that URL and open the URL in my browser I get this:
Code:
{"data":{"cpu":0.013017751479289963,"cpuinfo":{"cpus":3,"model":"Intel(R) Xeon(R) CPU E3-1230 v3 @ 3.30GHz","sockets":1},"info":{"fingerprint":"xx:xx:xx:xx:xx:xx:xx"},"kversion":"Linux 5.15.39-4-pve #1 SMP PVE 5.15.39-4 (Mon, 08 Aug 2022 15:11:15 +0200)","loadavg":[0.01,0.0,0.0],"memory":{"free":1058140160,"total":2071568384,"used":1013428224},"root":{"avail":24949886976,"total":33105428480,"used":6447726592},"swap":{"free":4292866048,"total":4292866048,"used":0},"uptime":537764,"wait":0.0}}
Try to set Audit permissions to / for your token in PBS Configuraion -> Access Control -> Permissions
 
Try to set Audit permissions to / for your token in PBS Configuraion -> Access Control -> Permissions
I also thought about that. But I created a new token for it with "Audit" for "/" and copy pasted it to "{$PBS.TOKEN.ID}" and "{$PBS.TOKEN.SECRET}" so I guess that should work.

Edit:
Yes, looks like permission problems. The PBS log shows this:
Aug 29 17:22:55 PBS proxmox-backup-proxy[594]: GET /api2/json/nodes/PBS/status: 403 Forbidden: [client [::ffff:192.168.43.70]:47816] permission check failed
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!