The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,114 other followers

Archive for the ‘Zabbix’ Category

Best android apps for zabbix – AndroidMeta

Posted by jpluimers on 2020/05/28

If I land a project using Zabbix again, one of the things I need to look into is [WayBackBest android apps for zabbix – AndroidMeta.

–jeroen

Posted in *nix, Android, Android Devices, Development, Linux, Mobile Development, Monitoring, Power User, Zabbix | Leave a Comment »

When monitoring Windows service memory consumption from Zabbix and you get zeros

Posted by jpluimers on 2020/02/17

This is a small reminder to myself that when monitoring Windows service memory consumption from Zabbix and you get zeros, it means you need to monitor the Windows process instead of the service. The process will give you actual memory usage.

–jeroen

Posted in *nix, Monitoring, Power User, Zabbix | Leave a Comment »

zabbix on Windows: check the configuration before restarting the Zabbix Agent service

Posted by jpluimers on 2019/09/27

If the Zabbix configuration on Windows (especially mismatches in C:\zabbix\zabbix.agentd.conf.d), then the Zabbix Agent will not start at all:

C:\zabbix\bin\win64>zabbix_agentd.exe --start
zabbix_agentd.exe [4711]: ERROR: cannot start service [Zabbix Agent]: [0x0000041D] The service did not respond to the start or control request in a timely fashion.

This is how to check it before starting the service:

C:\zabbix\bin\win64\zabbix_agentd.exe --config C:\zabbix_agentd.conf
zabbix_agentd.exe [43]: ERROR: cannot add user parameter "MyDuplicate[*],PowerShell.exe -File C:\zabbix\UniquePowerShellScript.ps1 "$1"": key "MyDuplicate" already exists

The problem is that in the C:\zabbix\zabbix.agent.conf.d directory, two files had a similar config:

UserParameter=MyDuplicate[*],PowerShell.exe -File C:\zabbix\FirstPowerShellScript.ps1 "$1"
UserParameter=MyDuplicate[*],PowerShell.exe -File C:\zabbix\SecondPowerShellScript.ps1 "$1"

The problem is that the first part of UserParameter (before the [*])  is a key which needs to be unique over all configuration files.

If everything is fine, you will see this:

C:\zabbix\bin\win64\zabbix_agentd.exe --config C:\zabbix_agentd.conf
zabbix_agentd.exe [1581]: use foreground option to run Zabbix agent as console application

If you need to manually start Zabbix as a service, then perform this (the first step is not needed if the service has already been stopped):

C:\zabbix\bin\win64>zabbix_agentd.exe --stop
zabbix_agentd.exe [1642]: service [Zabbix Agent] stopped successfully

C:\zabbix\bin\win64>zabbix_agentd.exe --start
zabbix_agentd.exe [1642]: service [Zabbix Agent] started successfully

–jeroen

Posted in *nix, Linux, Monitoring, Power User, Windows, Zabbix | Leave a Comment »

Zabbix agent and long running scripts: Timeout parameter in zabbix_agentd.conf

Posted by jpluimers on 2019/08/12

The [WayBack] stock zabbix_agentd.conf is about 10k and the documentation quite a bit larger, so it can take a while to figure out a setting.

I needed one to ensure that scripts could take longer to execute than the default.

Searching for a per-script setting on the server side revealed no solution, so I had to solve it on the agent side. There, a per-script setting is also impossible: there is only the global Timeout (one word, no PascalCase like TimeOut) setting in zabbix_agentd.conf which is the same for Unix and Windows based Zabbix installations:

Unix: [WayBack] Zabbix Documentation 3.0 – 3 Zabbix agent (UNIX)

Parameter Mandatory Range Default Description
Timeout no 130 3 Spend no more than Timeout seconds on processing

Windows: [WayBack] Zabbix Documentation 3.0 – 9.4 Zabbix agent (Windows)

Parameter Mandatory Range Default Description
Timeout no 130 3 Spend no more than Timeout seconds on processing

In my case it was for a PowerShell script that ran twice a day to verify how recent the installations on a particular machine were. The Timeout value needed to be at least 15 for that:

### Option: Timeout
# Spend no more than Timeout seconds on processing.
#
# Mandatory: no
# Range: 1-30
# Default:
# Timeout=3
Timeout=15

–jeroen

Read the rest of this entry »

Posted in *nix, Monitoring, Power User, Zabbix | Leave a Comment »

Zabbix triggers and web response scenarios

Posted by jpluimers on 2019/01/07

A few notes on Zabbix triggers and web scenarios:

  • Triggers are part of the web scenario as a whole, not the step inside a web scenario
  • A trigger is only displayed in the web scenario graph if it contains only the web response time
  • You do not need triggers for:
    • http response code: if you specify one or more “Status codes” (overview grid) or “Required status codes” (edit screen)” for a step, the web scenario will fail without the need for a trigger
    • http response content: if you specify a “Required” (overview grid) or “Required string” (edit screen) for a step, the web scenario will fail without the need for a trigger
  • If a step of a web scenario fails, the other steps are not executed.
  • Graphs for web scenarios show cumulative times of the steps, but absolute times for the triggers.

For now I’ve set these kinds of triggers on response times:

  • Level Warning: 2 minute of response time > average
  • Level Average: 5 minutes of response time > 2*average
  • Level High: 10 minutes of response time > 4*avarage
  • Level Disaster: 30 minutes of response time > 10*average

These are the colours by default used for the trigger levels: at http://example.org/zabbix/adm.triggerseverities.php

Default Zabbix trigger severities and their colours.

Default Zabbix trigger severities and their colours.

–jeroen

Posted in *nix, Monitoring, Power User, Zabbix | Leave a Comment »

 
%d bloggers like this: