10,388 bytes added
, 03:40, 2 April 2021
{{Languages}}
<!-- here we define the contrib name variable -->
<!-- we get the page title, remove suffix for translated version; if needed you can define there with the value you want-->
{{#vardefine:contribname| {{lc: {{#titleparts: {{BASEPAGENAME}} |1}} }} }}
{{#vardefine:smecontribname| smeserver-{{lc: {{#titleparts: {{BASEPAGENAME}} |1}} }} }}
<!-- we define the language -->
{{#vardefine:lang| {{lc: {{#titleparts: {{PAGENAME}} | | -1}} }} |en }}
{{Infobox contribs
|name={{#var:contribname}}
|image={{#var:contribname}}.jpg
|description_image= {{#var:contribname}} logo
|maintainer= maintainer
|licence=
|url= https://wiki.contribs.org
|category= Category you want
|tags=File,this,with,a,list,of,tags
}}
===Maintainer===
[mailto:daniel@firewall-services.com][[User:VIP-ire|Daniel B.]] from [http://www.firewall-services.com Firewall Services]
=== Version ===
{{#smeversion: smeserver-zabbix-agent }}
{{#smeversion: zabbix-agent-addons }}
=== Description ===
Zabbix agent is a very small daemon which will gather information about the host being monitored, and report it to one or several server(s) (or proxy(s)).
Agents can run in active or passive mode (or both):
*In active mode, the agent will make outgoing connection to the server (port 10051 by default).
*In passive mode, the server will connect to the agent (on port 10050 by default).
Please read Chap. 2.3.4.ZABBIX Agent page 39 and Chap. 3.3.ZABBIX Agent (UNIX, standalone daemon) of the manual for more information on Zabbix agent.
=== Installation ===
<tabs container><tab name="For SME 10">
yum install smeserver-extrarepositories-zabbix
then you need to enable the one you want zabbix42, zabbix44, zabbix45, zabbix50, zabbix51, zabbix52, zabbix53. You need to have an agent at most equal to the server version. If your zabbix server is on an SME it should equal or lesser than zabbix42 as per 2021/03. You can upgrade the agent later.
yum install smeserver-zabbix-agent --enablerepo=smecontribs,zabbix42
</tab>
<tab name="For SME 9">
first enable the needed repo: Firewall service and EPEL
yum install smeserver-extrarepositories-epel smeserver-extrarepositories-fws
signal-event yum-modify
to install Zabbix agent, just use yum:
yum --enablerepo=smecontribs,fws,epel install smeserver-zabbix-agent
</tab>
</tabs>
This package will download at least the following dependencies:
*zabbix (very small package with just common directories used by all zabbix components)
*zabbix-agent (the agent)
*smeserver-remoteuseraccess: this contrib is needed because it provides needed templates metadata for /etc/sudoers.
=== Configuration ===
Here's the list of available DB parameters for zabbix-agent service on SME:
*'''RemoteCommands''': (enabled|disabled). If you want to enable remote commands on zabbix agent (you should read the zabbix documentation). Please, be aware that there're security implications if you enable it. The default is disabled
*'''ServerPort''': port to contact the server when running in active mode. Default to 10051
*'''Servers''': List of servers (or proxy), separated by commas, to which send informations. The first one may be used for active checks, the others are only for passive mode
*'''TCPPort''': TCP port on which the agent will listen if passive mode is enabled
*'''access''': (public|private) If you want to open the agent on the public interface (only useful if passive is enabled). If you set this to 'public' you should use the AllowHosts key to limit the access
*'''active''': (enabled|disabled) Do you want to enabled the active mode
*'''passive''': (enabled|disabled) Do you want to enable the passive mode
*'''status''': (enabled|disabled) Should the service be automatically started
Once you have everything configured like you want, just issue
signal-event zabbix-agent-update
to expand the templates and restart the needed services.
===== Remote client with encryption =====
on the client do:
openssl rand -hex 32 > /etc/zabbix/zabbix_agentd.psk
chown :zabbix /etc/zabbix/zabbix_agentd.psk
chmod 640 /etc/zabbix/zabbix_agentd.psk
signal-event zabbix-agent-update
cat /etc/zabbix/zabbix_agentd.psk
you might also need a public access there:
config setprop zabbix-agent Servers IP1,IP2 access public active disabled passive enabled AllowHosts IP1,IP2
signal-event zabbix-agent-update
On the Zabbix server interface for this client select :
# Connections to host: psk
# Connections from host: psk
# PSK identity: domain.name-agent
# psk: [paste here the output of cat /etc/zabbix/zabbix_agentd.psk]
===== agent on the local zabbix server =====
<syntaxhighlight lang="bash">
# config setprop zabbix-agent access localhost Servers localhost active disabled passive enabled
# signal-event zabbix-agent-update
</syntaxhighlight>
===== Additional checks =====
Even if Zabbix agent is great and support natively a lot of checks, some were missing for my use, so I've added some UserParameters entries in the configuration file. For each of this check, you should add a new item with the name of the check as the key.
Configuring the corresponding checks on the server can be quite long. You can have a look at the [http://sme.firewall-services.com/downloads/zabbix/zabbix_SME.zip templates] I use to monitor SME Servers. This archive contains some templates/items/graphs/triggers in XML format (exported from Zabbix). You can use the Import/Export functionality of Zabbix (Manual Chap. 8.XML IMPORT AND EXPORT page 154) to import it on your server.
You can also have a look at the configuration file /etc/zabbix/zabbix_agentd.conf to see the commands used to return the corresponding values. You'll also find for each UserParameter information on how to create the corresponding item on the server.
Please, read chapter 4.11.User Parameters page 119 of the manual to have more information on how UserParameters work.
*External IP:
**'''ip.external''': Return the real external IP address.
*Incoming mails statistics:
{{Note box|Since version 0.1-28 of smeserver-zabbix-agent, the keys to retrieve emails statistics has changed. The value retrieved here are for the last 10 Minutes (the statistics are updated with a cronjob every 10 minutes), so you should configured these items to be refreshed every 600 seconds}}
**'''mail.in[dnsbl]''': number of emails rejected by DNSBL
**'''mail.in[rhsbl]''': number of emails rejected by RHSBL
**'''mail.in[clamav]''': number of emails rejected by CLAMAV
**'''mail.in[check_earlytalker]''': number of emails rejected by EARLYTALKER
**'''mail.in[check_basicheaders]''': number of emails rejected by BASICHEADERS
**'''mail.in[check_goodrcptto]''': number of emails rejected by GOODRCPTTO
**'''mail.in[check_spamhelo]''': number of emails rejected by SPAMHELO
**'''mail.in[total_denied]''': sum of rejected emails (sum of the above checks)
**'''mail.in[spam_denied]''': number of emails rejected by SPAMASSASSIN
**'''mail.in[other_denied]''': number of emails rejected by others checks
**'''mail.in[spam_queued]''': number of emails queued but marked as spam by SPAMASSASSIN
**'''mail.in[queued]''': number of emails queued (HAM)
**'''mail.in[total]''': number of emails received (accept + denied)
*Outgoing mails statistics:
**'''mail.out[total]''': sum of outgoing emails
**'''mail.out[success]''': number of successful transmitted emails
**'''mail.out[deferral]''': number of deferred emails
**'''mail.out[failure]''': number of failures
*Memory/Swap usage:
**'''vm.memory.size.used''': Actually used memory in bytes
**'''vm.memory.size.pused''': Actually used memory in %
**'''system.swap.size.used''': Actually used swap space in bytes
*MySQL Information:
**'''mysql.uptime''': uptime of mysql server in seconds
**'''mysql.threads''': number of threads
**'''mysql.questions''': number of queries since mysql has been started
**'''mysql.slowqueries''': number of slow queries
**'''mysql.qps''': average queries per seconds
**'''mysql.size''': total space used by mysql databases
*Network usage. These checks are useful if you want to monitor several SME Servers using one template (so same checks), but those servers use different interfaces configuration (eth0, eth1, br0, bond0, ppp0 etc...)
**'''net.if.in.internal''': Equivalent to net.if.in[ethX,bytes], but is independent of your internal interface name (eth0, bond0, br0 etc...)
**'''net.if.out.internal''': Equivalent to net.if.out[ethX,bytes]
**'''net.if.in.external''': Equivalent to net.if.in[ethX,bytes], but is independent of your external interface name (eth0, eth1, ppp0 etc...)
**'''net.if.out.external''': Equivalent to net.if.out[ethX,bytes]
{{Note box|Since version 0.1-38 of smeserver-zabbix-agent, the keys to retrieve UPS informations has changed. You now have to select the name of your UPS on the server side. The default name for an UPS in SME is '''UPS'''}}
*UPS status:
**'''ups.load[UPS]''': Current load (in %) of your UPS
**'''ups.battery.charge[UPS]''': Current charge (in %) of the battery
**'''ups.status[UPS]''': Current status of the UPS (OL, OB, OL CHRG etc...)
**'''ups.model[UPS]''': Model of the UPS
*Raid Array Monitoring:
**'''raid.sw.status''': Current status of your software Raid (all array)
**'''raid.mega.status''': Current status of your mega raid based raid array (for example, the perc5/6(i) are megaraid based). Requires additional MegaCLI package available from here: [http://www.lsi.com/storage_home/products_home/internal_raid/megaraid_sas/]
=== Uninstall ===
yum remove {{#var:smecontribname}} {{#var:contribname}}
=== Bugs ===
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]
and select the {{#var:smecontribname}} component or use {{BugzillaFileBug|product=SME%20Contribs|component={{#var:smecontribname}}|title=this link}}
Below is an overview of the current issues for this contrib:{{#bugzilla:columns=id,product,version,status,summary|sort=id|order=desc|component={{#var:smecontribname}} |noresultsmessage=No open bugs found.}}
===Changelog===
Only released version in smecontrib are listed here.
{{ #smechangelog: {{#var:smecontribname}} }}
{{ #smechangelog: {{#var:zabbix-agent-addons}} }}
<!-- list of category you want to see this page in -->
[[Category: Contrib]]
<!-- Please keep there the template revision number as is -->
[[contribtemplate::2| ]]
[[contriblang:: {{#var:lang}} | ]]