Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Linux » Monitoring services using Zabbix
  • SystoLOCK Passwordless Authentication
    Protect your Windows Devices with MFA with SystoLOCK Security | Vulnerability Scans and Assessment
  • Featured image Microsoft Outlook
    How to Recall an Email in Microsoft Outlook Network | Monitoring
  • Disable Microsoft SQL Auto Close Option
    Disable SQL Auto Close: Auto Close is enabled for both ePO and ePO Events Databases Oracle/MSSQL/MySQL
  • VMware Type 1 Hypervisor installation
    How to install ESXi on a Beelink EQ12 Mini PC Virtualization
  • SysInternals
    How to use the Process Explorer from SysInternals Tools Windows Server
  • Migrate from SQL Database
    Migrate Veeam One Database from SQL Server 2017 to 2025 Backup
  • Enable only Windows Admin to shutdown PC
    Allow only Administrators to shut down and reboot Server Windows
  • screenshot 2020 04 02 at 23.27.20
    Cloud Protection Manager: N2WS Veeam CPM Guide Backup

Monitoring services using Zabbix

Posted on 27/08/202124/09/2024 Dickson Victor By Dickson Victor 12 Comments on Monitoring services using Zabbix
Zabbix monitoring

For critical production servers and services, monitoring is very critical. One is to get notified about issues immediately and the second is to resolve quickly hence not affecting SLA. Here, I will be showing you the steps employed in monitoring services using Zabbix, a basic Zabbix template, and very easy Linux commands. Please see PC Health Check: How to Use Windows 11 App, Performance and Diagnostics in Microsoft Cloud with Azure Monitor, and How to check Hard Drive Health (SMART) in Windows.

The traditional way of monitoring services is by monitoring the ports associated with the services, however, in some cases/environments, critical services have to be monitored E.g. (squid). Hence in this post, you will see how to monitor services using service names and not ports on Linux servers.

Some other guides can be found in these links: Practical use of SELinux in production: How to locate directory file context and restore it ,how-to-create-a-static-pod-in-kubernetes-with-demos-that-can-help-you-become-a-better-Kubernetes-administrator, and how to create-and-deliver-a-report-on-system-utilization-on-a-Linux-based-os/.

Note: Moreover, You should already have the Zabbix monitoring tool installed in your environment to do this.

Service Check

First, check the services running

systemctl | grep running 
service monitoring

Take note of whatever service name you will want to monitor, Log in to your Zabbix console and create a new template and application.

Configuration -> Templates -> Create template
network monitoring

Create New application on Zabbix console  – > systemctl status

system health monitoring

Furthermore, Create an item for whatever service name you want to monitor

Zabbix monitoring
image-5

Here is a guide on how to install Zabbix Monitoring Tool on a Linux System, and how-to-use-container-insights-to-get-the-full-benefits-of-azure-monitor-for-azure-Kubernetes-workload.

Create Alert

Create individual Alert triggers

image-6

Trigger expression

{service monitoring using systemctl:system.run["systemctl status chronyd | grep -q running;echo $?"].last()}=1

Please change the service name in the expression to your configured service name.

Once Items and triggers have been created on the services needed. Test or simulate the new configurations by stopping services.

image-7

Now check Zabbix console

image-8

I hope you found his article useful on Monitoring services using Zabbix. Please feel free to leave a comment below.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Pocket (Opens in new window) Pocket
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Linux Tags:services

Post navigation

Previous Post: How to secure access to your Virtual Machine with Just-in-Time (JIT) VM Access
Next Post: Enable or disable automatic Google Chrome Live Caption on macOS

Related Posts

  • centos feature
    How to change the system time zone under RedHat and CentOS Linux
  • FEATURE IMAGE
    SSH into a VM created using Azure CLI or GUI Linux
  • maxresdefault
    Linux Directory Hierarchy Linux
  • Webp.net resizeimage 1
    Automate Infrastructure Deployments in the Cloud with Ansible and Azure Pipelines AWS/Azure/OpenShift
  • MM
    How to install Mattermost on Ubuntu and Debian Linux
  • Slide2 1
    SU Authentication Fix: Sudo Permission Denied in Ubuntu Linux

More Related Articles

centos feature How to change the system time zone under RedHat and CentOS Linux
FEATURE IMAGE SSH into a VM created using Azure CLI or GUI Linux
maxresdefault Linux Directory Hierarchy Linux
Webp.net resizeimage 1 Automate Infrastructure Deployments in the Cloud with Ansible and Azure Pipelines AWS/Azure/OpenShift
MM How to install Mattermost on Ubuntu and Debian Linux
Slide2 1 SU Authentication Fix: Sudo Permission Denied in Ubuntu Linux

Comments (12) on “Monitoring services using Zabbix”

  1. Avatar photo Sidheswar Biswal says:
    08/12/2021 at 5:55 AM

    image not showing clearly

    Log in to Reply
    1. chris Christian says:
      08/12/2021 at 11:31 AM

      In the future, we will improve, thank you for pointing this out.

      Log in to Reply
  2. Avatar photo mark burke says:
    18/01/2022 at 3:08 PM

    Hello, I’ve configured this but it’s not triggering the alert. Do i need to open a port from the zabbix server to the host?

    Log in to Reply
  3. Avatar photo Andy says:
    09/03/2022 at 2:23 PM

    I added the item but got an Unsupported item key error.

    Log in to Reply
    1. Avatar photo antoine pacaud says:
      09/05/2022 at 11:03 AM

      Did you add AllowKey=system.run[*] in the agent configuration file ?

      Log in to Reply
  4. Avatar photo antoine pacaud says:
    09/05/2022 at 11:02 AM

    Thanks it works for me with a zabbix version 5.4.9.
    But I had to change the format of the trigger because of that version :

    last(/Template_name/system.run[“systemctl status service_name | grep -q running; echo $?”])=1

    And in requirements I had to add “AllowKey=system.run[*]” in the agent configuration file.

    Log in to Reply
    1. chris Christian says:
      09/05/2022 at 7:42 PM

      Thank you so much for your input.

      Log in to Reply
    2. Avatar photo Fabrizio says:
      06/03/2023 at 4:52 PM

      Hi, can u please type the entire code? 
      For my case, i wrote this code for the trigger:
      last(/WePacsLinux/system.run[“systemctl status orthanc | grep -q running; echo $?”])=11
      and for the item:
      system.run[systemctl status orthanc | grep -q running; echo $?]
      but it gives me this error:
      incorrect trigger expression starting from “last(/WePacsLinux/system.run[“systemctl status orthanc | grep -q running; echo $?”])=1”.

      Log in to Reply
  5. Avatar photo Igor says:
    13/06/2022 at 3:28 PM

    Not working with quotes on Zabbix Server 5.4.3.
    For me item began to work (cron.service, for example) with this code:

    system.run[systemctl status cron.service | grep -q running; echo $?]
    
    Log in to Reply
    1. chris Christian says:
      15/06/2022 at 11:31 PM

      Thank you very much for sharing your solution!

      Log in to Reply
  6. Avatar photo sukhdevkhade35@gmail.com says:
    28/11/2022 at 5:39 PM

    Hi ..It is not possible through SNMP. Do you have any expression throgh snmp .

    net.tcp.service[service_name] it working for some service . Not for all service.

    Thanks

    Log in to Reply
  7. Avatar photo humza says:
    31/01/2023 at 2:22 PM

    can you please describe the total steps and commands briefly ? As it is not working

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • SystoLOCK Passwordless Authentication
    Protect your Windows Devices with MFA with SystoLOCK Security | Vulnerability Scans and Assessment
  • Featured image Microsoft Outlook
    How to Recall an Email in Microsoft Outlook Network | Monitoring
  • Disable Microsoft SQL Auto Close Option
    Disable SQL Auto Close: Auto Close is enabled for both ePO and ePO Events Databases Oracle/MSSQL/MySQL
  • VMware Type 1 Hypervisor installation
    How to install ESXi on a Beelink EQ12 Mini PC Virtualization
  • SysInternals
    How to use the Process Explorer from SysInternals Tools Windows Server
  • Migrate from SQL Database
    Migrate Veeam One Database from SQL Server 2017 to 2025 Backup
  • Enable only Windows Admin to shutdown PC
    Allow only Administrators to shut down and reboot Server Windows
  • screenshot 2020 04 02 at 23.27.20
    Cloud Protection Manager: N2WS Veeam CPM Guide Backup

Subscribe to Blog via Email

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

Join 1,832 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.