Changes

From SME Server
Jump to navigationJump to search
2,708 bytes added ,  09:40, 10 May 2020
Line 1: Line 1:  
{{Languages|Zabbix}}
 
{{Languages|Zabbix}}
   −
===Maintainer===
+
{{Incomplete}}
[mailto:daniel@firewall-services.com[[User:VIP-ire|Daniel B.]]] from [http://www.firewall-services.com Firewall Services]
        −
{{Incomplete}}
+
===Maintainer===
 
+
[mailto:daniel@firewall-services.com][[User:VIP-ire|Daniel B.]] from [http://www.firewall-services.com Firewall Services]
 
=== Description ===
 
=== Description ===
   Line 139: Line 138:     
=== Versions ===
 
=== Versions ===
Here are informations about the latest release of each component:
+
The following is the information about the latest release of each component:
{{ #smeversion: smeserver-zabbix-server }}
+
{{#smeversion: smeserver-zabbix-server }}
{{ #smeversion: zabbix-server }}
+
{{#smeversion: smeserver-zabbix-agent }}
{{ #smeversion: smeserver-zabbix-agent }}
  −
{{ #smeversion: zabbix-agent }}
  −
{{ #smeversion: smeserver-zabbix-proxy }}
  −
{{ #smeversion: zabbix-proxy }}
  −
 
  −
 
  −
 
      
=== Requirements ===
 
=== Requirements ===
*SME Server 7.X
+
*SME Server 7.X (9.X or higher for zabbix-server)
*php-bcmath (smeserver-zabbix-server only): if you have the standard php4 packages, it should be ok. If you have upgraded to php5 from centosplus repo, you should manually install php-bcmath package
+
*php>=5.4 for zabbix server only, hence you will need to first install smeserver-php-scl on SME9 and set php54 or higher as default php version
    
=== Components ===
 
=== Components ===
Line 158: Line 150:  
Zabbix is composed of four major components:
 
Zabbix is composed of four major components:
 
*The server (the main part). The server will store and analyse the different data, send alerts, etc...
 
*The server (the main part). The server will store and analyse the different data, send alerts, etc...
*The web interface (which is automatically installed with the server with this contrib)
+
*The web interface (which is automatically installed with the server with this contrib).
*The agent, which gathers informations on the different hosts you monitor
+
*The agent, which gathers informations on the different hosts you monitor.
*The proxy, which is an optional part, can be used to collect performance and availability data locally, and send it to the server
+
*The proxy, which is an optional part, can be used to collect performance and availability data locally, and send it to the server.
    
==== Server ====
 
==== Server ====
   −
The server is the core component of Zabbix software. It uses one database (MySQL in this contrib) to store configuration, performance and integrity informations. The server can check network services with simple check (ICMP, TCP etc...) for agent-less monitoring, it can monitor network devices using SNMP and is also the central component to which agent report informations (agent can work in active, passive, or both mode). The server will also analyse all the informations and send alerts depending on very flexible triggers.
+
The server is the core component of Zabbix software. It uses one database (MySQL in this contrib) to store configuration, performance and integrity information. The server can check network services with simple check (ICMP, TCP etc...) for agent-less monitoring, it can monitor network devices using SNMP and is also the central component to which agent report information (agent can work in active, passive, or both mode). The server will also analyse all the information and send alerts depending on very flexible triggers.
 +
 
 +
===== Installation on SME9=====
 +
First enable the needed repo: Firewall service and REMI
 +
{{:Fws}}
 +
{{:Remi-safe}}
   −
===== Installation =====
+
signal-event yum-modify
    
to install Zabbix server, just use yum:
 
to install Zabbix server, just use yum:
  yum --enablerepo=smecontribs install smeserver-zabbix-server
+
  yum --enablerepo=smecontribs,fws,remi-safe install smeserver-zabbix-server --exclude=smeserver-zabbix-proxy
 +
NB: the --exclude=smeserver-zabbix-proxy is due to a conflict in late 2019 on SME9 as FWS started using zabbix from zabbix repo instead of building it. We will fix this for SME10 in few months.
 +
 
 +
then go to your server-manager to set php5.4 or higher as default php for your SME, or you will not be able to access to zabbix web gui, or just issue the following
 +
config setprop php54 PhpModule enabled  #replace here with php55 or php56 if you have other needs
 +
signal-event php-update
 +
 
 +
then you will have to either tweak the default configuration as explain in next step or just issue :
 +
signal-event zabbix-server-update
 +
 
 +
then go to your web interface : https://yourserveradress/zabbix
    
===== DB Parameters =====
 
===== DB Parameters =====
Line 181: Line 188:  
*'''JabberPassword''': Password for the account (for "JabberAccount")
 
*'''JabberPassword''': Password for the account (for "JabberAccount")
 
*'''JabberTLS''': (enabled|disabled) Does your Jabber server requires TLS security
 
*'''JabberTLS''': (enabled|disabled) Does your Jabber server requires TLS security
{{Note box|The different Jabber settings above are not for the built-in jabber notification function (because I couldn't get it working as my server requires TLS and the built-in feature do not support it). But I've included a external script using sendxmpp to send the notification. You should have a media called 'xmpp' in zabbix administration. }}  
+
{{Note box|The different Jabber settings above are not for the built-in jabber notification function (because I couldn't get it working as my server requires TLS and the built-in features do not support it). But I've included a external script using sendxmpp to send the notification. You should have a media called 'xmpp' in zabbix administration. }}  
    
*'''NodeID''': The node ID of your server. If you don't use distributed monitoring (just one central Zabbix server), you should let this to 0
 
*'''NodeID''': The node ID of your server. If you don't use distributed monitoring (just one central Zabbix server), you should let this to 0
Line 199: Line 206:  
===== Web Interface =====
 
===== Web Interface =====
   −
The main web interface is available (if not disabled with teh key WebAccess) on https://server.domain.tld/zabbix.
+
The main web interface is available (if not disabled with the key WebAccess) on https://server.domain.tld/zabbix.
The default user is '''admin''', with password '''zabbix''' (you should change this password ASAP)
+
The default user is '''Admin''' (with uppercase A as first letter), with password '''zabbix''' (you should change this password ASAP)
    
Here are some screenshots of what you can get with zabbix
 
Here are some screenshots of what you can get with zabbix
Line 215: Line 222:       −
For more screenshots, you can have a look at the project website [http://www.zabbix.com/screenshots.php here]
+
For more screenshots, visit the project website [http://www.zabbix.com/screenshots.php here]
    
==== Agent ====
 
==== Agent ====
   −
Zabbix agent is a very small daemon which will gather informations about the host being monitored, and report it to one or several server(s) (or proxy(s)).
+
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):
 
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 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).  
 
*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 informations on Zabbix agent.
+
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 =====
+
===== Installation SME9 =====
 +
first enable the needed repo: Firewall service 
 +
{{:Fws}}
 +
 
 +
and EPEL
 +
{{:Epel}}
 +
signal-event yum-modify
    
to install Zabbix agent, just use yum:
 
to install Zabbix agent, just use yum:
  yum --enablerepo=smecontribs install smeserver-zabbix-agent
+
  yum --enablerepo=smecontribs,fws,epel install smeserver-zabbix-agent
      Line 255: Line 268:     
to expand the templates and restart the needed services.
 
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 =====
 
===== Additional checks =====
Line 261: Line 298:  
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.
 
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 informations on how to create the corresponding item on the 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 informations on how UserParameters works.
+
Please, read chapter 4.11.User Parameters page 119 of the manual to have more information on how UserParameters work.
    
*External IP:
 
*External IP:
Line 286: Line 323:  
**'''mail.in[total]''': number of emails received (accept + denied)
 
**'''mail.in[total]''': number of emails received (accept + denied)
   −
*Outgoing mails statistics
+
*Outgoing mails statistics:
 
**'''mail.out[total]''': sum of outgoing emails
 
**'''mail.out[total]''': sum of outgoing emails
 
**'''mail.out[success]''': number of successful transmitted emails
 
**'''mail.out[success]''': number of successful transmitted emails
Line 292: Line 329:  
**'''mail.out[failure]''': number of failures
 
**'''mail.out[failure]''': number of failures
   −
*Memory/Swap usage
+
*Memory/Swap usage:
 
**'''vm.memory.size.used''': Actually used memory in bytes
 
**'''vm.memory.size.used''': Actually used memory in bytes
 
**'''vm.memory.size.pused''': Actually used memory in %
 
**'''vm.memory.size.pused''': Actually used memory in %
 
**'''system.swap.size.used''': Actually used swap space in bytes
 
**'''system.swap.size.used''': Actually used swap space in bytes
   −
*MySQL Informations
+
*MySQL Information:
 
**'''mysql.uptime''': uptime of mysql server in seconds
 
**'''mysql.uptime''': uptime of mysql server in seconds
 
**'''mysql.threads''': number of threads
 
**'''mysql.threads''': number of threads
Line 311: Line 348:  
**'''net.if.out.external''': Equivalent to net.if.out[ethX,bytes]
 
**'''net.if.out.external''': Equivalent to net.if.out[ethX,bytes]
   −
*UPS status
+
{{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.load''': Current load (in %) of your UPS
+
 
**'''ups.battery.charge''': Current charge (in %) of the battery
+
*UPS status:
**'''ups.status''': Current status of the UPS (OL, OB, OL CHRG etc...)
+
**'''ups.load[UPS]''': Current load (in %) of your UPS
**'''ups.model''': Model of the 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 Array Monitoring:
 
**'''raid.sw.status''': Current status of your software Raid (all array)
 
**'''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/]
 
**'''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/]
Line 323: Line 362:  
==== Proxy ====
 
==== Proxy ====
   −
Zabbix proxy is a lightweight daemon. It will act as a server for agents, will cache locally (in a mysql database) the informations, and send it to the server it belongs to. This is useful to monitor networks elements behind a firewall.
+
Zabbix proxy is a lightweight daemon. It will act as a server for agents, will cache locally (in a mysql database) the information, and send it to the server it belongs to. This is useful to monitor networks elements behind a firewall.
   −
===== Installation =====
+
===== Installation SME9=====
 +
first enable the needed repo: Firewall service 
 +
{{:Fws}}
    +
signal-event yum-modify
 
to install Zabbix proxy, just use yum:
 
to install Zabbix proxy, just use yum:
  yum --enablerepo=smecontribs install smeserver-zabbix-proxy
+
  yum --enablerepo=smecontribs,fws install smeserver-zabbix-proxy
    
===== DB Parameters =====
 
===== DB Parameters =====
Line 359: Line 401:  
{{Warning box|If you use active checks, you need to name the host in zabbix server hostname.domainname.tld (check the file /etc/zabbix/zabbix_agentd.conf, the directive Hostname). If you don't do that, checks won't work}}
 
{{Warning box|If you use active checks, you need to name the host in zabbix server hostname.domainname.tld (check the file /etc/zabbix/zabbix_agentd.conf, the directive Hostname). If you don't do that, checks won't work}}
   −
You can download [http://sme.firewall-services.com/downloads/zabbix/zabbix_SME.zip here] an archive with some XML exports of the templates I use to monitor my servers. Just extract the archive, and import the templates you want in Zabbix (using the Import/Export menu of zabbix configuration)
+
You can download [http://repo.firewall-services.com/misc/monitoring/templates_zabbix.zip here] an archive with some XML exports of the templates I use to monitor my servers. Just extract the archive, and import the templates you want in Zabbix (using the Import/Export menu of zabbix configuration)
    
Each XML file represent a template in Zabbix
 
Each XML file represent a template in Zabbix
Line 378: Line 420:  
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]
 
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]
 
and select the smeserver-zabbix component or use on of this link:
 
and select the smeserver-zabbix component or use on of this link:
 +
====smeserver-zabbix-proxy====
 +
new bug for {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-zabbix-proxy|title=proxy}}
 +
{{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-zabbix-zabbix-proxy|noresultsmessage="No open bugs found."}}
 +
 +
====smeserver-zabbix-agent====
 +
new bug for {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-zabbix-agent|title=agent}}
 +
{{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-zabbix-agent|noresultsmessage="No open bugs found."}}
 +
 +
====smeserver-zabbix-server====
 +
new bug for {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-zabbix-server|title=server}}
 +
{{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-zabbix-server|noresultsmessage="No open bugs found."}}
 +
   −
{{BugzillaFileBug|product=SME%20Contribs|component=smeserver-zabbix-server|title=server}}{{BugzillaFileBug|product=SME%20Contribs|component=smeserver-zabbix-agent|title=agent}}{{BugzillaFileBug|product=SME%20Contribs|component=smeserver-zabbix-proxy|title=proxy}}
      
----
 
----
 
[[Category:Contrib]]
 
[[Category:Contrib]]
 +
[[Category:Administration:Monitoring]]
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,228

edits

Navigation menu