Hi All,
After referring to multiple sources (webpage, forum posts, Zabbix Installation Steps for Unix-like system), I have distilled the steps into the one listed below. Since the system is on Solaris 11.4, I thought it would be proper to manage it using SMF. I have completed all the steps but somehow the service stuck at maintenance.
The installation steps are as below.
System Info :
1. Zabbix Server 6.4.18; RHEL 8.10
2. Remote Server : Solaris 11.4 on SPARC, Zabbix Agent 6.0.33
01. Download the Agent here : https://cdn.zabbix.com/zabbix/binari...openssl.tar.gz
(Note: Or your can also visit the official download page here : https://www.zabbix.com/download_agents).
When you extract the tarball, you'll get 3 files : zabbix_agentd, zabbix_get & zabbix_sender.
02 Copy the files to the respective directory as below :
# cp zabbix_agentd /usr/sbin/
# cp zabbix_get /usr/local/bin/
# cp zabbix_sender /usr/local/bin/
03. Create Zabbix Group & User, then add the user to the group.
# groupadd zabbix
# useradd -c 'Zabbix agent' -d / -g zabbix -s /usr/bin/false zabbix
04. Create directory to store configuration file and copy configuration file into the directory.
# mkdir /etc/zabbix
# chmod -R 755 /etc/zabbix
# cd /etc/zabbix/
# cp -v /path/to/file/zabbix_agentd.conf /etc/zabbix/
Note: zabbix_agentd.conf (Modified from default .conf file to Linux)
LogType=file
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=512
Server=xxx.xxx.xxx.xxx # Zabbix server IP Address
ServerActive=xxx.xxx.xxx.xxx # Only needed if you want to enable Active Check
05. Create log file directory and log file.
# mkdir /var/log/zabbix
# chown -R zabbix:zabbix /var/log/zabbix
# touch /var/log/zabbix/zabbix_agentd.log
# chown zabbix:zabbix /var/log/zabbix/zabbix_agentd.log
06. Configure SMF (Service Manangement Facility)
a. Create manifest directory
# cd /var/svc/manifest/application/
# mkdir zabbix-agent
# chmod 755 zabbix-agent
# chown root:sys zabbix-agent
b. Copy the manifest to the directory.
# cp /path/to/file/zabbix-agentd.xml /var/svc/manifest/application/zabbix-agent/
c. Restart the Manifest-Import service to import the manifest.
# svcadm restart manifest-import
d. Verify if service is running.
# svcs zabbix-agentd
Note: SMF Manifest are created by executing the command below then modifying section as necessary.
# svcbundle -o zabbix-agentd.xml -s service-name=application/zabbix-agentd -s model=daemon -s start-method="/usr/sbin/zabbix _agentd -c /etc/zabbix/zabbix_agentd.conf"
<?xml version="1.0" ?>
<!DOCTYPE service_bundle
SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<!--
Manifest created by svcbundle (2025-Feb-20 16:31:49+0800)
-->
<service_bundle name="application/zabbix-agentd" type="manifest">
<service name="application/zabbix-agentd" version="1" type="service">
<!--
The following dependency keeps us from starting until the
multi-user milestone is reached.
-->
<dependency name="multi_user_dependency" grouping="require_all"
restart_on="none" type="service">
<service_fmri value="svc:/milestone/multi-user"/>
</dependency>
<exec_method name="start" type="method" timeout_seconds="300"
exec="/usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf"
/>
<!--
The exec attribute below can be changed to a command that SMF
should execute to stop the service. Use svcbundle -s
stop-method to set the attribute.
-->
<exec_method name="stop" type="method" timeout_seconds="300"
exec=":kill"/>
<!--
A duration property group is not needed.
-->
<instance name="default" enabled="true"/>
<template>
<common_name>
<!--
zabbix-agentd
-->
<loctext xml:lang="C">
application/zabbix-agentd
</loctext>
</common_name>
<description>
<!--
Zabbix Agent for Solaris v6.0.33
-->
<loctext xml:lang="C">
The application/zabbix-agentd service.
</loctext>
</description>
</template>
</service>
</service_bundle>
After referring to multiple sources (webpage, forum posts, Zabbix Installation Steps for Unix-like system), I have distilled the steps into the one listed below. Since the system is on Solaris 11.4, I thought it would be proper to manage it using SMF. I have completed all the steps but somehow the service stuck at maintenance.
The installation steps are as below.
System Info :
1. Zabbix Server 6.4.18; RHEL 8.10
2. Remote Server : Solaris 11.4 on SPARC, Zabbix Agent 6.0.33
01. Download the Agent here : https://cdn.zabbix.com/zabbix/binari...openssl.tar.gz
(Note: Or your can also visit the official download page here : https://www.zabbix.com/download_agents).
When you extract the tarball, you'll get 3 files : zabbix_agentd, zabbix_get & zabbix_sender.
02 Copy the files to the respective directory as below :
# cp zabbix_agentd /usr/sbin/
# cp zabbix_get /usr/local/bin/
# cp zabbix_sender /usr/local/bin/
03. Create Zabbix Group & User, then add the user to the group.
# groupadd zabbix
# useradd -c 'Zabbix agent' -d / -g zabbix -s /usr/bin/false zabbix
04. Create directory to store configuration file and copy configuration file into the directory.
# mkdir /etc/zabbix
# chmod -R 755 /etc/zabbix
# cd /etc/zabbix/
# cp -v /path/to/file/zabbix_agentd.conf /etc/zabbix/
Note: zabbix_agentd.conf (Modified from default .conf file to Linux)
LogType=file
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=512
Server=xxx.xxx.xxx.xxx # Zabbix server IP Address
ServerActive=xxx.xxx.xxx.xxx # Only needed if you want to enable Active Check
05. Create log file directory and log file.
# mkdir /var/log/zabbix
# chown -R zabbix:zabbix /var/log/zabbix
# touch /var/log/zabbix/zabbix_agentd.log
# chown zabbix:zabbix /var/log/zabbix/zabbix_agentd.log
06. Configure SMF (Service Manangement Facility)
a. Create manifest directory
# cd /var/svc/manifest/application/
# mkdir zabbix-agent
# chmod 755 zabbix-agent
# chown root:sys zabbix-agent
b. Copy the manifest to the directory.
# cp /path/to/file/zabbix-agentd.xml /var/svc/manifest/application/zabbix-agent/
c. Restart the Manifest-Import service to import the manifest.
# svcadm restart manifest-import
d. Verify if service is running.
# svcs zabbix-agentd
Note: SMF Manifest are created by executing the command below then modifying section as necessary.
# svcbundle -o zabbix-agentd.xml -s service-name=application/zabbix-agentd -s model=daemon -s start-method="/usr/sbin/zabbix _agentd -c /etc/zabbix/zabbix_agentd.conf"
<?xml version="1.0" ?>
<!DOCTYPE service_bundle
SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<!--
Manifest created by svcbundle (2025-Feb-20 16:31:49+0800)
-->
<service_bundle name="application/zabbix-agentd" type="manifest">
<service name="application/zabbix-agentd" version="1" type="service">
<!--
The following dependency keeps us from starting until the
multi-user milestone is reached.
-->
<dependency name="multi_user_dependency" grouping="require_all"
restart_on="none" type="service">
<service_fmri value="svc:/milestone/multi-user"/>
</dependency>
<exec_method name="start" type="method" timeout_seconds="300"
exec="/usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf"
/>
<!--
The exec attribute below can be changed to a command that SMF
should execute to stop the service. Use svcbundle -s
stop-method to set the attribute.
-->
<exec_method name="stop" type="method" timeout_seconds="300"
exec=":kill"/>
<!--
A duration property group is not needed.
-->
<instance name="default" enabled="true"/>
<template>
<common_name>
<!--
zabbix-agentd
-->
<loctext xml:lang="C">
application/zabbix-agentd
</loctext>
</common_name>
<description>
<!--
Zabbix Agent for Solaris v6.0.33
-->
<loctext xml:lang="C">
The application/zabbix-agentd service.
</loctext>
</description>
</template>
</service>
</service_bundle>