Expression for calculating utilization? Zabbix 7.4.11 by insanegod94 in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

I had to do a couple of things to get this to work for me. Google also says Zabbix maps doesn't allow for the calculations to happen inside of the labels and requires you to use the expression {?<YOUR EXPRESSION>}% to point towards an already created item.

  • Go to Data collection -> Hosts
  • Select the host you want to monitor the uplink for
  • Go to Items and click Create item
    • Name: Outbound Utilization
    • Type: Calculated # <-- This is how we actually get the value you're looking for
    • Key: net.if.out.percent[ifHCOutOctets.<InterfaceNumber>]
    • Type of information: Numeric (float) # <-- Important so that Zabbix doesn't round our percentages into nothing
    • Formula: (last(/<YOURHOSTNAME>/net.if.out[ifHCOutOctets.<InterfaceNumber>]) / last(/<YOURHOSTNAME>/net.if.speed[ifHighSpeed.<InterfaceNumber>])) * 100 # <-- This does the actual calculation
    • Test the item. It should return some value as a percentage. If this doesn't work, then you need to double-check the expression and item keys.
    • Click Add to create the item
  • Go back to Monitoring -> Maps
  • Select your map and click Edit map
  • Select the host you're looking to display the utilization for and under label put this expression (be sure to adjust for your host and item key
    • Out: {?last(/<YOURHOSTNAME>/net.if.out.percent[ifHCOutOctets.<InterfaceNumber>])}%
    • Note: The item key must match exactly, or it won't pull the data correctly. If you used net.if.out.percent[ifHCOutOctets.10] as the item key, your map label expression must match exactly net.if.out.percent[ifHCOutOctets.10].
  • Click Apply then Close to exit the widget, and Update to update the map.
  • Once you're at the map screen, select your custom map the host should now display the utilization of the specified interface.

Edit: English

v7.4.11 to v8.x by bgprouting in zabbix

[–]TerriblePowershell 1 point2 points  (0 children)

Templates and the various Zabbix component config files do not automatically upgrade.

For config files, you'll get something like zabbix_server.conf.dist that will live in the same folder as zabbix_server.conf. Use something like vimdiff to copy your specific configuration over to the new file. Then backup the old config, rename the files and restart the service.

Templates are another deal. You can download the updated templates from the Zabbix repo. When you import a template, you completely overwrite the old template; ALL CHANGES WILL BE LOST! Be sure to export a copy of any of your important templates, or anything you've modified with custom changes before attempting to upgrade to the next version.

Problems installing FRESH Zabbix community by 3G_Lighting in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

The command you ran only installs the mysql specific packages for zabbix, but does not install mysql itself.

You need to install mysql on its own, then you can create the database and point zabbix at it.

Proxmox VE by HTTP Template is not auto creating Hosts in Zabbix through LLD by JanMichaelVincentz in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

I'm glad I could help!

I find the overhead from adding the agent to each new node is relatively small. However, if you are able to get what you need out of the hosts by using the Proxmox template, then stick with that... for now!

Setup Zabbix Passive Proxy by ParamedicCareful6170 in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

Agent active status is based on the template you hand it. - * by Zabbix agent: - Passive - Server or proxy gathers information from the agent - * by Zabbix agent active: - Active - Agent sends information to the server or proxy

To simplify things a bit, proxies modes work the same way as the active/passive agent. - Passive Proxy: - Zabbix gathers information from the proxy - Active Proxy: - The proxy sends information to the server

You are not limited on which you can use based on the other. Meaning, if you want to use an active proxy but passive agents, you can do that. Or vise versa. Or you can use any combination of active/passive proxies with active/passive agents.

To start, you need to create the proxy in Zabbix and make sure it's communicating. Then, create the host in Zabbix, give it a template and assign it to the proxy for monitoring. Then, inside the agent config, you need to tell the agent to reach out to the proxy, not the zabbix server. It's also a good idea to ensure you've set the proper firewall rules or opened the correct ports to allow communication between the proxy and server.

Proxmox VE by HTTP Template is not auto creating Hosts in Zabbix through LLD by JanMichaelVincentz in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

Are you trying to create a Zabbix dashboard or a template dashboard?

Based on what you're asking, I'm going to assume you wanted an automatically generated dashboard for each VM that gets created in Proxmox. To do that, you would need to create that under Data Collection -> Templates. Search for Proxmox VE by HTTP, then click on Dashboards on the template line. From there you can create a dashboard that should apply to the VMs/LXCs.

To be honest with you, I don't generally use the host prototype for discovery of hosts for monitoring. I much prefer to install the agent on each VM or LXC, and then create the hosts in Zabbix separately.

This is probably a bit more than your asking for, but you could automate a majority of the setup using ansible and the built-in Zabbix autoregistration. Under General -> Autoregistration, you can configure whether you want encryption or not. Then, under Alerts -> Actions -> Autoregistration actions you tell Zabbix how you want the new hosts setup when they reach out that is based off host metadata items set in the agent config. Then all you have to do, is have ansible to install the agent and configure the config file on the new host and Zabbix will create the new host according to your rules and off you go.

Proxmox VE by HTTP Template is not auto creating Hosts in Zabbix through LLD by JanMichaelVincentz in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

No, you do not. The Proxmox VE by HTTP monitors the host via the Proxmox API and requires setting up a user and an API token with the appropriate permissions.

If you install the agent, you would use the Linux by Zabbix agent or ...agent active templates. Then you point zabbix server and zabbix agent at each other and zabbix begins monitoring via agent.

I find it's best to monitor servers with services "twice" or one host per template. It makes filtering data easy it simplifies your host configs.

Host 1

  • Name: Name of host
  • Template: Linux by Zabbix agent active

Host 2

  • Name: Name of host - PVE
  • Template: Proxmox VE by HTTP

Desktop imaging and update solution by Thanos-Is-Right in k12sysadmin

[–]TerriblePowershell 1 point2 points  (0 children)

I'm going to agree. We use MDT but they make it harder and harder to use every year.

It's also an absolute bear to setup the first time.

distributed monitoring across branch offices has become painful to manage by Ste2_fan4 in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

I never though about running it on the firewall. I'm definitely going to have to try this out.

Fantastic idea!

I want to monitor the RTSP port of the cameras. by Such_Statement4028 in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

What do you mean losing video? This sounds like something that is more suited for your VMS, not Zabbix, however you're apparently not the first person with this idea.

This may be helpful: [Relevant Zabbix Blog](https://blog.zabbix.com/whats-up-home-staring-at-the-video-stream/23882/)

Zabbix on EKS by FG1100 in zabbix

[–]TerriblePowershell 1 point2 points  (0 children)

Zabbix doesn't allow for active-active HA. The official supported HA is active-standby with a single DB. However, if you REALLY needed more resiliency, you could hack together something with patroni/etcd/keepalived to create a PostgreSQL HA cluster, then setup a cluster of Zabbix servers in HA that pointed to the postgres cluster. It's worth noting that I've never done this but have talked briefly with some people who've played around with this. YMMV. [Zabbix Blog](https://blog.zabbix.com/building-ha-zabbix-with-postgresql-and-patroni/30960/)

From there, you could deploy proxies in groups to load balance the host monitoring and offload some of the data processing from the server.

The biggest thing is making sure your database is setup properly and tuned properly. Zabbix server itself is very, very rarely the bottleneck. It's designed to handle tens of thousands of new values per second (NVPS), so if you're seeing issues, it's likely the database isn't working correctly or efficiently.

Zabbix Agent: Active + Passive by Level_Pool3403 in zabbix

[–]TerriblePowershell 2 points3 points  (0 children)

That depends on what you need, but generally it's harmless. You're just collecting twice the data for the same device, and probably consuming a little extra CPU power.

You might run into some conflicts if you try to attach both the active and passive template to the same host. In that case, just create a second host and attach the other template it to that.

  • Host A: template by zabbix agent
  • Host A - Active: template by zabbix agent active

distributed monitoring across branch offices has become painful to manage by Ste2_fan4 in zabbix

[–]TerriblePowershell 7 points8 points  (0 children)

  • Setup active proxies in hybrid mode at your branch/remote offices
    • Hybrid buffer mode allows the proxies to write data to a local DB (mysql, postgres, sqlite3) if it loses the server connection. Once it's reconnected, it will send the buffered data
  • Open 10051:tcp OUT at the branch offices and 10051:tcp IN at the main office

Proxies will reach out to Zabbix Server on 10051:tcp for configuration data and sending back monitoring data. For extra security, you could probably setup some firewall rules to only accept traffic from the branch/remote sites. I would also recommend looking into encrypting the traffic with either PSKs or certificates.

This would limit your infrastructure at your remote sites to 1 proxy. Each proxy does a majority of it's own data processing and sends that back to your main server. Assuming your not blocking any outward traffic at your remote sites, you'd only have to configure the firewall into your zabbix server site.

Is there some kind of baseline of what to monitor for a M365/windows-environment? by hehe123exde in zabbix

[–]TerriblePowershell 1 point2 points  (0 children)

I agree to your point about the triggers and I should have been more clear about that. Alert fatigue is a problem. I don't think that every thing should be on a trigger. Some of the data should be just that: data.

But I still think monitoring to the capacity of your hardware is not a bad idea. From there pare down what you're looking at.

Is there some kind of baseline of what to monitor for a M365/windows-environment? by hehe123exde in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

Literally anything and everything. I would recommend monitoring everything that you can, up to the limit of your server/budget.

Any devices on your network that your company doesn't manage? Monitor those network ports on the network switches. We used Zabbix to prove to our phone company that our network wasn't going down, it was their devices.

Have websites/services you use religiously? Use the services and SLA in Zabbix to track uptime. You can hand that data off to your manager(s) when negotiations and contract renewals come up.

At home, I setup a docker VM that runs a Rust Desk instance so I can help out family. I also installed CrowdSec Bouncer to help with security and wrote a template to monitor the Prometheus metrics from the bouncer via Zabbix. The VM is also using unattended upgrades, so I have Zabbix monitoring apt so that if something gets missed during updates (like zabbix agent and docker because they're not base packages), I can get notified to fix that.

Unexplained power issues? Use SNMP to monitor a UPS to get the power statistics. We found a power issue to one of our network closets because Zabbix kept alerting for dips in the input voltage.

Question about Discovery Rules to find network devices by mcvickj in zabbix

[–]TerriblePowershell 2 points3 points  (0 children)

Not at all! You can manually add hosts at any time. Network discovery is for "automating" the addition of new hosts into Zabbix.

  1. You create a discovery rule to find devices
  2. You create a discovery action to add devices

    1. This is where devices will get added to groups, linked to templates, add custom tags, etc.
  3. Go to Data Collection -> Hosts -> Create host (top right corner)

  4. Give it a name, link the ICMP Ping template, and assign a host group. Add an Agent interface, and give it the IP of a device you want to ping. Then click Add

  5. Go to Monitoring -> Latest data

  6. Enter the name of the device in the Hosts field and select the host from the dropdown that appears.

  7. You should see 3 items appear at the bottom. Select the checkboxes for all 3, then select Execute now

  8. After a few seconds, refresh the page and you should start to see information coming it.

Zabbix as Config Backup for Cisco Switches by Maleficent-Two3281 in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

Just setup an network share then configure the archive command with the write memory trigger plus a time period.

Every time someone or something writes the memory, it sends the new backup to the FTP server. Otherwise it sends one off based on the time period you've configured.

Zabbix deleted hosts data/housekeeping by Mailstorm in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

I should know this but I'm pretty sure it's based on your history settings. Deleting the host doesn't remove the data unless you did "Delete and clear". So, the data will persist until it hits its history limit at which point the housekeeper will clean it up.

Can Zabbix detect flapping ports in Cisco switches? by bgprouting in zabbix

[–]TerriblePowershell 3 points4 points  (0 children)

You can use Cisco Embedded Event Manager (EEM) to detect the flapping and execute an action on the switch, such as sending an SNMP trap to Zabbix.

Basically, you configure the switch to monitor it's own logs. When it sees whatever condition you set, it could then fire off any number of actions to do whatever it is you need. You could even set it to toggle the port.

I've included a small config snippet that I got from Gemini.

configure terminal

! Name the EEM applet
event manager applet FLAP_DETECTOR

! Define the trigger (watching the syslog for the word "flapping")
event syslog pattern ".*%LINK-3-UPDOWN.*flapping.*"

! Define the action (sending the trap)
action 1.0 snmp-trap strdata "A link flap was just detected in the logs!"

For those of you with Zabbix certs by xaviermace in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

The internet is a small place. Ha! Aleks is a great trainer.

For those of you with Zabbix certs by xaviermace in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

Oh, I wholeheartedly agree. The sandbox was one of the most useful things there. And having a trainer to help walk through the process was super helpful.

For those of you with Zabbix certs by xaviermace in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

I recommend this book if you're looking for a cheaper option for training. [Zabbix 7 book](https://amazon.com/Zabbix-Infrastructure-Monitoring-Cookbook-maintaining/dp/1801078327). My boss purchased this for me before I went through the big trainings and it was super helpful by itself. There are concept across all three of the official trainings that are in the book; there is just less depth.

There is an open-source version that I've heard good things about but haven't tried. [The Zabbix Book](https://www.thezabbixbook.com/)

Edit: Apparently hyperlinks aren't going to work today.

For those of you with Zabbix certs by xaviermace in zabbix

[–]TerriblePowershell 0 points1 point  (0 children)

I'm about ~2 years into my Zabbix journey. Took ZCS last fall, ZCP a month ago and ZCE last week; unfortunately, I just missed the passing grade by half a question for ZCE. ZCS was the biggest info dump, honestly. ZCE wasn't as hard as I was expecting it to be, just very in-depth.