Áú»¢¶Ä²©

This is the documentation page for an unsupported version of Áú»¢¶Ä²©.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

1 Construire des plugins chargeables

Aper?u

Cette page fournit les ¨¦tapes n¨¦cessaires pour cr¨¦er un binaire de plugin chargeable ¨¤ partir des sources.

Si l'archive source est t¨¦l¨¦charg¨¦e, il est possible de cr¨¦er le plugin hors ligne, c'est-¨¤-dire sans connexion Internet.

Le plugin PostgreSQL est utilis¨¦ comme exemple. D'autres plugins chargeables peuvent ¨ºtre construits de la m¨ºme mani¨¨re.

Steps

1. Download the plugin sources from . The official download page will be available soon.

2. Transfer the archive to the machine where you are going to build the plugin.

3. Unarchive the tarball, e.g.:

tar xvf zabbix-agent2-plugin-postgresql-1.0.0.tar.gz

Make sure to replace "zabbix-agent2-plugin-postgresql-1.0.0.tar.gz" with the name of the downloaded archive.

4. Enter the extracted directory:

cd <path to directory>

5. Run:

make

6. The plugin executable may be placed anywhere as long as it is loadable by Áú»¢¶Ä²© agent 2. Specify the path to the plugin binary in the plugin configuration file, e.g. in postgresql.conf for the PostgreSQL plugin:

Plugins.PostgreSQL.System.Path=/path/to/executable/zabbix-agent2-plugin-postgresql

7. Path to the plugin configuration file must be specified in the Include parameter of the Áú»¢¶Ä²© agent 2 configuration file:

Include=/path/to/plugin/configuration/file/postgresql.conf

Cibles Makefile

Les plugins chargeables fournis par Áú»¢¶Ä²© ont des makefiles simples avec les cibles suivantes?:

Cible Description
make Construire le plugin.
make clean Supprimer tous les fichiers qui sont normalement cr¨¦¨¦s en construisant le plugin.
make check Effectuer des auto-tests. Une vraie base de donn¨¦es PostgreSQL est requise.
make style V¨¦rifier le style de code Go avec 'golangci-lint'.
make format Formater le code Go avec 'go fmt'.
make dist Cr¨¦er une archive contenant les sources du plug-in et les sources de tous les packages n¨¦cessaires pour cr¨¦er le plug-in et ses auto-tests.