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 1,778 other followers

Archive for the ‘Monitoring’ Category

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 »

Zabbix: the web scenario respose time trigger unit is seconds, not milliseconds

Posted by jpluimers on 2019/01/04

When you look at the “Response time” graph for a Zabbix web scenario step that fetches a URL, you’d think the unit would be milliseconds (as last/min/avg/max are all listed in milliseconds).

However an expression like this puts the trigger off the scale:

{owa.example.org:web.test.time[https OWA,https OWA returns http code 200,resp].last()}>100

This trigger however works:

{owa.example.org:web.test.time[https OWA,https OWA returns http code 200,resp].last()}>0.1

The [WayBack] web scenario step items topic indeed lists the web.test.time unit as seconds

–jeroen

Web scenario:

https OWA returns http code 20015 sec https://example.org/owa

https OWA returns http code 200 15 sec https://example.org/owa

Trigger:

"{owa.example.org:web.test.time[https

0.1″ class=”size-medium” /> {owa.example.org:web.test.time[https OWA,https OWA returns http code 200,resp].last()}>0.1

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

DBA Blog 2.0: Installing Zabbix into Azure using a MySQL PaaS

Posted by jpluimers on 2019/01/04

Interesting: [WayBack] DBA Blog 2.0: Installing Zabbix into Azure using a MySQL PaaS

–jeroen

Posted in *nix, Azure Cloud, Cloud, Cloud Development, Development, Infrastructure, Monitoring, Power User, Software Development, Windows Azure, Zabbix | Leave a Comment »

 
%d bloggers like this: