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,860 other subscribers

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 »

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 »

Monitoring: you can ignore ShellHWDetection service warnings on when it’s not started

Posted by jpluimers on 2018/12/31

I’m monitoring quite a bunch of Windows machines with Zabbix.

One of the services I turn off for monitoring is ShellHWDetection as otherwise you get this notification often:

Service "ShellHWDetection" (Shell Hardware Detection) is not running (startup type automatic)

When it happens, it’s always when there is nobody logged on to the machine. But sometimes you do not get this message. I’ve not fully figured out the pattern well, but since the service is associated with auto-play of inserted CD/DVD/USB and other media, I don’t bother too much.

References:

–jeroen

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

Zabbix user groups and user type

Posted by jpluimers on 2018/11/12

Like any product documentation, Zabbix’ is shattered and terse.

So here is how I ensured a specific user could edit the items of hosts:

  1. Added new user group named Administer Configuration Host Items containing user Example having these read-write composing permissions:
    • Applicatie ontwikkel test
    • Applicatie productie Approve demo VPN
    • servers Dbases Kantoor applicaties
  2. Changed User type of user named Example from Zabbix User to Zabbix Admin so access to the Configuration tab is granted.

See 2 Permissions [Zabbix Documentation 3.0] for User type explanation; excerpt:

Zabbix Admin: The user has access to the Monitoring and Configuration menus. The user has no access to any host groups by default. Any permissions to host groups must be explicitly given.

 

–jeroen

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

Zabbix: better “Disk space usage” graphs for Windows systems

Posted by jpluimers on 2018/01/09

The default [WayBack] Zabbix Disk space usage graph (named Disk space usage {#FSNAME}) for Windows looks like this:

Total disk space on C:

Total disk space on C:

What I want is a graph over time. Based on that, I can start working on different triggers than the default “less than 20% free space available“, for instance:

So I want graphs similar to the CPU load (in the graph itself called Processor load) graph which looks like this:

CPU load (a.k.a. Processor load) is actually graphed

CPU load (a.k.a. Processor load) is actually graphed “over time”

It is part of the Graph prototypes for the Template OS Windows discovery list Mounted filesystem discovery:

For now I’ve added this graph prototype as Line chart with 95th percentile:

If that work, I can start working on the triggers:

–jeroen

Posted in *nix, Monitoring, Power User, Zabbix | 2 Comments »