From 759d87f947a7c988572c376aa8d6c9cc433530f2 Mon Sep 17 00:00:00 2001 From: Kurt Dillen Date: Fri, 29 Aug 2014 10:15:02 +0200 Subject: [PATCH] * Moved all Gentoo related files to contrib. * Moved src/zabbix/contrib as contrib * Added Zabbix templates as individual files for each individual Template * Created a Datastore detect template with 2 detection methods: - Datastores are detected and added to the vcenter server - Datastores are detected and for each datastore an individual host object is created (disabled by default) * Created a vcenter proces template to check if the vcenter processes are running and API port available. --- README.gentoo.md => contrib/README.gentoo.md | 4 +- {src/zabbix/contrib => contrib}/README.md | 0 .../init.d/gentoo/vpoller-proxy | 0 .../init.d/gentoo/vpoller-worker | 0 .../zabbix}/externalscripts/cvpoller-zabbix | 0 .../zabbix}/externalscripts/vpoller-zabbix | 0 ...e-Detection-vPoller-C_Client_templates.xml | 613 +++++++ .../Datastore-vPoller-C_Client_templates.xml | 565 ++++++ .../Hypervisor-vPoller-C_Client_templates.xml | 1329 ++++++++++++++ ...ual-Machine-vPoller-C_Client_templates.xml | 1577 +++++++++++++++++ .../vSphere-vPoller-C_Client_templates.xml | 684 +++++++ .../general/vCenter-Processes_templates.xml | 264 +++ .../Datastore-vPoller_templates.xml | 565 ++++++ .../Hypervisor-vPoller_templates.xml | 1329 ++++++++++++++ .../Virtual-Machine-vPoller_templates.xml | 1577 +++++++++++++++++ .../vSphere-vPoller_templates.xml | 738 ++++++++ 16 files changed, 9243 insertions(+), 2 deletions(-) rename README.gentoo.md => contrib/README.gentoo.md (89%) rename {src/zabbix/contrib => contrib}/README.md (100%) rename src/init.d/vpoller-proxy.gentoo => contrib/init.d/gentoo/vpoller-proxy (100%) rename src/init.d/vpoller-worker.gentoo => contrib/init.d/gentoo/vpoller-worker (100%) rename {src/zabbix/contrib => contrib/zabbix}/externalscripts/cvpoller-zabbix (100%) rename {src/zabbix/contrib => contrib/zabbix}/externalscripts/vpoller-zabbix (100%) create mode 100644 contrib/zabbix/templates/c-client/Datastore-Detection-vPoller-C_Client_templates.xml create mode 100644 contrib/zabbix/templates/c-client/Datastore-vPoller-C_Client_templates.xml create mode 100644 contrib/zabbix/templates/c-client/Hypervisor-vPoller-C_Client_templates.xml create mode 100644 contrib/zabbix/templates/c-client/Virtual-Machine-vPoller-C_Client_templates.xml create mode 100644 contrib/zabbix/templates/c-client/vSphere-vPoller-C_Client_templates.xml create mode 100644 contrib/zabbix/templates/general/vCenter-Processes_templates.xml create mode 100644 contrib/zabbix/templates/internal-client/Datastore-vPoller_templates.xml create mode 100644 contrib/zabbix/templates/internal-client/Hypervisor-vPoller_templates.xml create mode 100644 contrib/zabbix/templates/internal-client/Virtual-Machine-vPoller_templates.xml create mode 100644 contrib/zabbix/templates/internal-client/vSphere-vPoller_templates.xml diff --git a/README.gentoo.md b/contrib/README.gentoo.md similarity index 89% rename from README.gentoo.md rename to contrib/README.gentoo.md index 7464920..8302ad5 100644 --- a/README.gentoo.md +++ b/contrib/README.gentoo.md @@ -50,8 +50,8 @@ mv vpoller-cclient /usr/local/bin/ - Install init scripts -cp src/init.d/vpoller-proxy.gentoo /etc/init.d/vpoller-proxy -cp src/init.d/vpoller-worker.gentoo /etc/init.d/vpoller-worker +cp contrib/init.d/gentoo/vpoller-proxy /etc/init.d/vpoller-proxy +cp contrib/init.d/gentoo/vpoller-worker /etc/init.d/vpoller-worker - Install the logrotate template diff --git a/src/zabbix/contrib/README.md b/contrib/README.md similarity index 100% rename from src/zabbix/contrib/README.md rename to contrib/README.md diff --git a/src/init.d/vpoller-proxy.gentoo b/contrib/init.d/gentoo/vpoller-proxy similarity index 100% rename from src/init.d/vpoller-proxy.gentoo rename to contrib/init.d/gentoo/vpoller-proxy diff --git a/src/init.d/vpoller-worker.gentoo b/contrib/init.d/gentoo/vpoller-worker similarity index 100% rename from src/init.d/vpoller-worker.gentoo rename to contrib/init.d/gentoo/vpoller-worker diff --git a/src/zabbix/contrib/externalscripts/cvpoller-zabbix b/contrib/zabbix/externalscripts/cvpoller-zabbix similarity index 100% rename from src/zabbix/contrib/externalscripts/cvpoller-zabbix rename to contrib/zabbix/externalscripts/cvpoller-zabbix diff --git a/src/zabbix/contrib/externalscripts/vpoller-zabbix b/contrib/zabbix/externalscripts/vpoller-zabbix similarity index 100% rename from src/zabbix/contrib/externalscripts/vpoller-zabbix rename to contrib/zabbix/externalscripts/vpoller-zabbix diff --git a/contrib/zabbix/templates/c-client/Datastore-Detection-vPoller-C_Client_templates.xml b/contrib/zabbix/templates/c-client/Datastore-Detection-vPoller-C_Client_templates.xml new file mode 100644 index 0000000..e264f54 --- /dev/null +++ b/contrib/zabbix/templates/c-client/Datastore-Detection-vPoller-C_Client_templates.xml @@ -0,0 +1,613 @@ + + + 2.0 + 2014-08-29T08:00:02Z + + + Datastores + + + Templates + + + + + + diff --git a/contrib/zabbix/templates/c-client/Datastore-vPoller-C_Client_templates.xml b/contrib/zabbix/templates/c-client/Datastore-vPoller-C_Client_templates.xml new file mode 100644 index 0000000..c323d25 --- /dev/null +++ b/contrib/zabbix/templates/c-client/Datastore-vPoller-C_Client_templates.xml @@ -0,0 +1,565 @@ + + + 2.0 + 2014-08-29T07:59:39Z + + + Templates + + + + + + + + {Template VMware vCenter Datastore - vPoller with C client:cvpoller-zabbix["-m", "datastore.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "summary.accessible"].min(5)}=0 + Datastore {HOST.HOST} is not accessible + + 0 + 2 + Datastore {HOST.HOST} is not accessible + +Datastore URL: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vCenter Datastore - vPoller with C client:cvpoller-zabbix["-m", "datastore.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "freeSpacePercentage"].min(5)}<20 + Free space is less than 20% on datastore {HOST.HOST} + + 0 + 4 + Free space is less than 20% on datastore {HOST.HOST} + +Datastore URL: {HOST.NAME} +Datastore free space: {ITEM.LASTVALUE}% +vSphere Host: {$VSPHERE.HOST} + 0 + + + + diff --git a/contrib/zabbix/templates/c-client/Hypervisor-vPoller-C_Client_templates.xml b/contrib/zabbix/templates/c-client/Hypervisor-vPoller-C_Client_templates.xml new file mode 100644 index 0000000..087f6a5 --- /dev/null +++ b/contrib/zabbix/templates/c-client/Hypervisor-vPoller-C_Client_templates.xml @@ -0,0 +1,1329 @@ + + + 2.0 + 2014-08-29T08:00:27Z + + + Templates + + + + + + + + {Template VMware vCenter Hypervisor - vPoller with C client:cvpoller-zabbix["-m", "host.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "summary.quickStats.overallCpuUsagePercentage"].min(5)}>90 + High CPU utilization on host {HOST.NAME} + + 0 + 2 + High CPU utilization on host {HOST.NAME} + +Host: {HOST.NAME} +CPU load: {ITEM.LASTVALUE}% +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vCenter Hypervisor - vPoller with C client:cvpoller-zabbix["-m", "host.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "summary.quickStats.overallMemoryUsagePercentage"].min(5)}>90 + High memory usage on host {HOST.NAME} + + 0 + 2 + High memory usage on {HOST.NAME} + +Host: {HOST.NAME} +Memory usage: {ITEM.LASTVALUE}% +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vCenter Hypervisor - vPoller with C client:cvpoller-zabbix["-m", "host.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "runtime.inMaintenanceMode"].last()}=1 + Host {HOST.NAME} is in maintenance mode + + 0 + 1 + Host {HOST.NAME} is in maintenance mode + +Host: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vCenter Hypervisor - vPoller with C client:cvpoller-zabbix["-m", "host.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "runtime.powerState"].iregexp(poweredOff,5)}=1 + Host {HOST.NAME} is powered off + + 0 + 1 + Host {HOST.NAME} is powered off + +Host: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vCenter Hypervisor - vPoller with C client:cvpoller-zabbix["-m", "host.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "summary.overallStatus"].iregexp(red,5)}=1 + Overall status of {HOST.NAME} is {ITEM.LASTVALUE} + + 0 + 4 + + 0 + + + + {Template VMware vCenter Hypervisor - vPoller with C client:cvpoller-zabbix["-m", "host.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "summary.rebootRequired"].min(5)}=1 + Reboot required for host {HOST.NAME} + + 0 + 1 + Reboot is required for host {HOST.NAME} + +Host: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + diff --git a/contrib/zabbix/templates/c-client/Virtual-Machine-vPoller-C_Client_templates.xml b/contrib/zabbix/templates/c-client/Virtual-Machine-vPoller-C_Client_templates.xml new file mode 100644 index 0000000..847c33d --- /dev/null +++ b/contrib/zabbix/templates/c-client/Virtual-Machine-vPoller-C_Client_templates.xml @@ -0,0 +1,1577 @@ + + + 2.0 + 2014-08-29T08:00:49Z + + + Templates + + + + + + + + {Template VMware vCenter Virtual Machine - vPoller with C client:cvpoller-zabbix["-m", "vm.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "summary.overallStatus"].iregexp(red,5)}=1 + Overall status of Virtual Machine {HOST.NAME} is {ITEM.LASTVALUE} + + 0 + 4 + Overall status of Virtual Machine {HOST.NAME} is {ITEM.LASTVALUE} + +Virtual Machine: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vCenter Virtual Machine - vPoller with C client:cvpoller-zabbix["-m", "vm.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "runtime.powerState"].iregexp(poweredOff,5)}=1 + Virtual Machine {HOST.NAME} is powered off + + 0 + 1 + Virtual Machine {HOST.NAME} is powered off + +Virtual Machine: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vCenter Virtual Machine - vPoller with C client:cvpoller-zabbix["-m", "vm.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "guest.toolsRunningStatus"].iregexp(guestToolsNotRunning,5)}=1 + VMware Tools not running on {HOST.NAME} + + 0 + 2 + VMware Tools not running on {HOST.NAME} + +Virtual Machine: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + diff --git a/contrib/zabbix/templates/c-client/vSphere-vPoller-C_Client_templates.xml b/contrib/zabbix/templates/c-client/vSphere-vPoller-C_Client_templates.xml new file mode 100644 index 0000000..585a7f7 --- /dev/null +++ b/contrib/zabbix/templates/c-client/vSphere-vPoller-C_Client_templates.xml @@ -0,0 +1,684 @@ + + + 2.0 + 2014-08-29T07:58:42Z + + + Hypervisors + + + Templates + + + Virtual machines + + + + + + + + {Template VMware vCenter - vPoller with C client:icmpping[{HOST.NAME},3,,,].min(5)}#1 + vSphere host {HOST.NAME} is unreachable for 5 minutes + + 0 + 4 + + 0 + + + + diff --git a/contrib/zabbix/templates/general/vCenter-Processes_templates.xml b/contrib/zabbix/templates/general/vCenter-Processes_templates.xml new file mode 100644 index 0000000..cf251ee --- /dev/null +++ b/contrib/zabbix/templates/general/vCenter-Processes_templates.xml @@ -0,0 +1,264 @@ + + + 2.0 + 2014-08-29T08:01:11Z + + + Templates + + + + + + + + {Template VMWare vCenter Processes:net.tcp.port[,443].last(0)}=0 + VMWare vCenter API Port not reachable + + 0 + 4 + + 0 + + + + {Template VMWare vCenter Processes:proc.num[vpxd.exe].last(0)}=0 + VMWare VirtualCenter is down + + 0 + 4 + Master vCenter process is down + 0 + + + + diff --git a/contrib/zabbix/templates/internal-client/Datastore-vPoller_templates.xml b/contrib/zabbix/templates/internal-client/Datastore-vPoller_templates.xml new file mode 100644 index 0000000..b121182 --- /dev/null +++ b/contrib/zabbix/templates/internal-client/Datastore-vPoller_templates.xml @@ -0,0 +1,565 @@ + + + 2.0 + 2014-08-21T12:53:51Z + + + Templates + + + + + + + + {Template VMware vSphere Datastore - vPoller:vpoller-zabbix["-m", "datastore.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "summary.accessible"].min(5)}=0 + Datastore {HOST.HOST} is not accessible + + 0 + 2 + Datastore {HOST.HOST} is not accessible + +Datastore URL: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vSphere Datastore - vPoller:vpoller-zabbix["-m", "datastore.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "freeSpacePercentage"].min(5)}<20 + Free space is less than 20% on datastore {HOST.HOST} + + 0 + 4 + Free space is less than 20% on datastore {HOST.HOST} + +Datastore URL: {HOST.NAME} +Datastore free space: {ITEM.LASTVALUE}% +vSphere Host: {$VSPHERE.HOST} + 0 + + + + diff --git a/contrib/zabbix/templates/internal-client/Hypervisor-vPoller_templates.xml b/contrib/zabbix/templates/internal-client/Hypervisor-vPoller_templates.xml new file mode 100644 index 0000000..821c6ec --- /dev/null +++ b/contrib/zabbix/templates/internal-client/Hypervisor-vPoller_templates.xml @@ -0,0 +1,1329 @@ + + + 2.0 + 2014-08-21T12:54:54Z + + + Templates + + + + + + + + {Template VMware vSphere Hypervisor - vPoller:vpoller-zabbix["-m", "host.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "summary.quickStats.overallCpuUsagePercentage"].min(5)}>90 + High CPU utilization on host {HOST.NAME} + + 0 + 2 + High CPU utilization on host {HOST.NAME} + +Host: {HOST.NAME} +CPU load: {ITEM.LASTVALUE}% +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vSphere Hypervisor - vPoller:vpoller-zabbix["-m", "host.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "summary.quickStats.overallMemoryUsagePercentage"].min(5)}>90 + High memory usage on host {HOST.NAME} + + 0 + 2 + High memory usage on {HOST.NAME} + +Host: {HOST.NAME} +Memory usage: {ITEM.LASTVALUE}% +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vSphere Hypervisor - vPoller:vpoller-zabbix["-m", "host.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "runtime.inMaintenanceMode"].last()}=1 + Host {HOST.NAME} is in maintenance mode + + 0 + 1 + Host {HOST.NAME} is in maintenance mode + +Host: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vSphere Hypervisor - vPoller:vpoller-zabbix["-m", "host.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "runtime.powerState"].iregexp(poweredOff,5)}=1 + Host {HOST.NAME} is powered off + + 0 + 1 + Host {HOST.NAME} is powered off + +Host: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vSphere Hypervisor - vPoller:vpoller-zabbix["-m", "host.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "summary.overallStatus"].iregexp(red,5)}=1 + Overall status of {HOST.NAME} is {ITEM.LASTVALUE} + + 0 + 4 + + 0 + + + + {Template VMware vSphere Hypervisor - vPoller:vpoller-zabbix["-m", "host.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "summary.rebootRequired"].min(5)}=1 + Reboot required for host {HOST.NAME} + + 0 + 1 + Reboot is required for host {HOST.NAME} + +Host: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + diff --git a/contrib/zabbix/templates/internal-client/Virtual-Machine-vPoller_templates.xml b/contrib/zabbix/templates/internal-client/Virtual-Machine-vPoller_templates.xml new file mode 100644 index 0000000..0aef59d --- /dev/null +++ b/contrib/zabbix/templates/internal-client/Virtual-Machine-vPoller_templates.xml @@ -0,0 +1,1577 @@ + + + 2.0 + 2014-08-21T12:55:40Z + + + Templates + + + + + + + + {Template VMware vSphere Virtual Machine - vPoller:vpoller-zabbix["-m", "vm.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "summary.overallStatus"].iregexp(red,5)}=1 + Overall status of Virtual Machine {HOST.NAME} is {ITEM.LASTVALUE} + + 0 + 4 + Overall status of Virtual Machine {HOST.NAME} is {ITEM.LASTVALUE} + +Virtual Machine: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vSphere Virtual Machine - vPoller:vpoller-zabbix["-m", "vm.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "runtime.powerState"].iregexp(poweredOff,5)}=1 + Virtual Machine {HOST.NAME} is powered off + + 0 + 1 + Virtual Machine {HOST.NAME} is powered off + +Virtual Machine: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + {Template VMware vSphere Virtual Machine - vPoller:vpoller-zabbix["-m", "vm.get", "-V", "{$VSPHERE.HOST}", "-n", "{HOST.NAME}", "-p", "guest.toolsRunningStatus"].iregexp(guestToolsNotRunning,5)}=1 + VMware Tools not running on {HOST.NAME} + + 0 + 2 + VMware Tools not running on {HOST.NAME} + +Virtual Machine: {HOST.NAME} +vSphere Host: {$VSPHERE.HOST} + 0 + + + + diff --git a/contrib/zabbix/templates/internal-client/vSphere-vPoller_templates.xml b/contrib/zabbix/templates/internal-client/vSphere-vPoller_templates.xml new file mode 100644 index 0000000..5990060 --- /dev/null +++ b/contrib/zabbix/templates/internal-client/vSphere-vPoller_templates.xml @@ -0,0 +1,738 @@ + + + 2.0 + 2014-08-21T12:52:51Z + + + Datastores + + + Hypervisors + + + Templates + + + Virtual machines + + + + + + + + {Template VMware vSphere - vPoller:icmpping[{HOST.NAME},3,,,].min(5)}#1 + vSphere host {HOST.NAME} is unreachable for 5 minutes + + 0 + 4 + + 0 + + + +