Subversion Repositories vnag

Compare Revisions

No changes between revisions

Regard whitespace Rev 31 → Rev 32

/trunk/plugins/nextcloud_version/NextCloudVersionCheck.class.php
0,0 → 1,126
<?php /* <ViaThinkSoftSignature>
gX9e3ZsTr/5gCndjoXkh5Y65OgXPOPRob9TUwW2ssq+YdiQl3g/A8t35kb23dX6WN
fU0aZTP1S2DBLLaf0I6CiKrli99a9KsHjA7kH4rmjed5RFwqBoRbUxJTFvt4X0EkX
8k/sIUmdES8kVO+JTfIlUB4ZFjVlc89bTWQaeagXkE58f8Fhr+Up9GvQJ2eJDEUpv
Zfw7kHZ+odkkiK5L+aCP+Mwl+A044R/e8SnBMf3ng7PKwLRoGu9d2iRAEdAIUzZWz
RAxmnyVqsjtUUxSPrCp+3WOmzdR1hWLZm+BJvpGOTjuICKXxOatyIsBR76mh2ndri
PrD9y8NLdI/azsEiJWZgCJr8h1R2/SWF1ndiC5nshT2sZBAQLdSQ/zvcbIdHtnibq
63KEDcR/m3V657gVmT1UAAM7JtcTh2x9GDz5ZWAg7Vcb+q54s9A6NNEXaHOc3XMHq
aCGuf1EYZyaQeTiyPkgJHwtH4rawwu4K+keDm+loS/KQ9btuC0tDLcupwJZn9qREo
2YJ2IwKaNzRj7DNkIG7ASwqwcbWQSx2RqUWm9zG0D5NIx+Jc97A19v3p3HaplGH5K
+1anSj87rtxENA+n1L+8ZbvI4SZ0txLxS2sJwYr/0Pv2gWUxUdoVhmNPRWAKnQM8w
12TqndyF4ls5KamJemkz3RSiYLWH67sW1jBi+QYu/VGcf15vOmlHMQemf+TEly1sA
zn7BQsxGS5Wosux4fToyLNKNvXlaWiuo6Q1SACRTns9rKnX9atFrnydO1NHaA1WkA
KgEQolI7fL2ggz+6veuyAbHnpMvp26essnXApwC604HOFW7IB4lrnZCyk8UHtGixD
xy7bHKXV1jPGXkN/AUADY3Avq1/6N65GAAPNoHnKrlGVjDJyI7H/KMiTPASzJzJ0e
XFpmgWSHmQfPMNv0dFwjE8siQyF2FwGz4bYb4FbfLheUhEZRcGtZniAZMHT4zPAK4
+Mp61QsX/79a1NBg3gmPtk1cziK6UyhuD2BubUm3y4MXANDxZhe0mw0UxKQtW0XDL
yXBDmGL8D3yPdmafx4UublOjvfAJLZDjYENPoaDhH8ZCowcdSbe7NZKsCtNWsRh+a
7kEUZ2wEtCWiajyOq4piR9fRO4uVb+4Umdw+UaG6kKlCbuV4jkC48EQUUt56c19zK
WopXwCSa2GZioCz5vUzNoeNtdjJDMXgW+Af/PbV4qBRZkv3vYJ84Z8fFDZrGqUnpU
5mLlK8KuaGLg3nZLXsNYgepTXPqvtTvC9Xps/HNsUBiHBcKNcff8iqOl6cWZlBCl1
hOWTlTqhzBLCLnXKxnvX+yG9c2chKna94ZAPgX7w95k5vX8+xOg9nfwAIfjZkm83C
w==
</ViaThinkSoftSignature> */ ?>
<?php
 
/*
* VNag - Nagios Framework for PHP
* Developed by Daniel Marschall, ViaThinkSoft <www.viathinksoft.com>
* Licensed under the terms of the Apache 2.0 license
*
* Revision 2021-06-26
*/
 
declare(ticks=1);
 
class NextCloudVersionCheck extends VNag {
protected $argSystemDir = null;
 
public function __construct() {
parent::__construct();
 
$this->registerExpectedStandardArguments('Vvht');
 
$this->getHelpManager()->setPluginName('check_nextcloud_version');
$this->getHelpManager()->setVersion('1.0');
$this->getHelpManager()->setShortDescription('This plugin checks if a local Nextcloud system has the latest version installed.');
$this->getHelpManager()->setCopyright('Copyright (C) 2011-$CURYEAR$ Daniel Marschall, ViaThinkSoft.');
$this->getHelpManager()->setSyntax('$SCRIPTNAME$ [-d <directory>]');
$this->getHelpManager()->setFootNotes('If you encounter bugs, please contact ViaThinkSoft at www.viathinksoft.com');
 
// Individual (non-standard) arguments:
$this->addExpectedArgument($this->argSystemDir = new VNagArgument('d', 'directory', VNagArgument::VALUE_REQUIRED, 'nextCloudPath', 'The local directory where your Nextcloud installation is located.'));
}
 
protected function get_nextcloud_version($local_path) {
$local_path = realpath($local_path) === false ? $local_path : realpath($local_path);
 
if (!file_exists($local_path . '/version.php')) {
throw new Exception('This is not a valid Nextcloud installation in "'.$local_path.'".');
}
 
// TODO: this is a security vulnerability if an non-root user can control the input of version.php !
$vendor = 'unknown';
$OC_Version = array(0,0,0,0);
$OC_VersionString = 'unknown';
$OC_Edition = 'unknown';
$OC_Channel = 'unknown';
$OC_Build = 'unknown';
include $local_path . '/version.php';
 
if ($vendor != 'nextcloud') {
throw new Exception('This is not a valid Nextcloud installation in "'.$local_path.'". It is "$vendor".');
}
 
$baseUrl = 'https://updates.nextcloud.org/updater_server/';
 
// More information about the paramters, see https://github.com/nextcloud/updater_server/blob/master/src/Request.php
$php_version = explode('.', PHP_VERSION);
$update_url = $baseUrl . '?version='.
implode('x', $OC_Version).'x'.
'x'. // installationMtime
'x'. // lastCheck
$OC_Channel.'x'.
$OC_Edition.'x'.
urlencode($OC_Build).'x'.
$php_version[0].'x'.
$php_version[1].'x'.
intval($php_version[2]); // Last part could be something like "28-2+0~20210604.85+debian9~1.gbp219f11"
 
$cont = file_get_contents($update_url);
if ($cont === false) {
throw new Exception('Could not determinate current Nextcloud version in "'.$local_path.'".');
}
 
if ($cont === '') {
return array($OC_VersionString, $OC_VersionString, $OC_Channel);
} else {
$xml = simplexml_load_string($cont);
$new_ver = (string)$xml->version;
return array($OC_VersionString, $new_ver, $OC_Channel);
}
}
 
protected function cbRun($optional_args=array()) {
$system_dir = $this->argSystemDir->getValue();
if (empty($system_dir)) {
throw new Exception("Please specify the directory of the Nextcloud installation.");
}
$system_dir = realpath($system_dir) === false ? $system_dir : realpath($system_dir);
 
if (!is_dir($system_dir)) {
throw new Exception('Directory "'.$system_dir.'" not found.');
}
 
list($cur_ver, $new_ver, $channel) = $this->get_nextcloud_version($system_dir);
 
if ($cur_ver === $new_ver) {
$this->setStatus(VNag::STATUS_OK);
$this->setHeadline("Nextcloud version $cur_ver [$channel] is the latest available version for your Nextcloud installation at $system_dir", true);
} else {
$this->setStatus(VNag::STATUS_WARNING);
$this->setHeadline("Nextcloud version $cur_ver [$channel] is outdated. Newer version is $new_ver [$channel] for installation at $system_dir", true);
}
}
}
/trunk/plugins/nextcloud_version/check_nextcloud_version
0,0 → 1,43
#!/usr/bin/php
<?php /* <ViaThinkSoftSignature>
xVeOH1DT2hHtxhdRlGk36N9Tf7qpMph20Vk2QYT7oh5rHMX/lB34evoDGH+DCIUx5
mWJoTcL4ml/cBwR6rxfQ8s7xx1OefygXJB312goDwQtTBNStNS0CwBmLuBzmxSYx0
ScB4sK14RpU6saH/+uYjPsvnoyl860NqZa02TZA8Vk60GUvCkBKRLtfjcfYWkyF2U
umXAdBUQLT1e7+4BUG0x5XB0cVoOzs/QI2HU36J/I/ky3YVUp23cmC0zO6cVL0JkS
P0Y+CP+LAlxjOByGcywIhx41/e+hXbmVkW0jweae7jgo1xRtA5qwSO2V6296RKoqy
fYZjGiKkpkR9sbAw62bLyMA8l/Dp0nrR8TGfdTjSYo1MANQzUdXn/66wrM1ooxA0G
BQRlIlPR2dZqWLlrPzCxMqKx3NKD+RxvbEnTGVc26vUN/XLhfv+yv78IrkLFvvbqt
DWRMa2Ykuop7iXuIgPiTQPC4p2Wxe/y3OuyFVpOV/vRau1stVFfxMNfLNhUeEZbXx
bq4DCm6cNcqzwxIjJBodIdccmSyl55ync8ltzeaQ0iKxWKufxidSffD0RxlU7S8E0
TkvyHaKSWahQ29Dgax1zt8+nFw9lZWcONoTDXB3llATGovXHfojB9fhc+zyhx3lyU
uI6zXRt+tKxzR22FkKFfQx9YvVPD4hPUApMlnO9jy9p0tIiK8Qe/PE4oMDQlXG8VN
0VaR6Y1nnrIC2qhMOng5fRZtrvfroxjQCyCzU5mGrOOYzNldBGY9q+kPLI0AicPnz
rJsrSgK1a9Evd7stfnYhNhEkSYZHgNt6Flri2epwzIDpUfidRk9ow32eLrWzzPVyh
0G2AgduoZ5gX1u2n6NH/k31dmww1KwsZ9VvGZJ5tLrcc2weptsQF3ZnuJqT4+dZaY
S9t8LafCSFdpTMb4iH/uFKMnPNVlih/UjmFQiI6jdtqK1a/6SZ9WGVTZ8xRQ2wfod
src5Qa/Q0ie+DlD3TgAZpPp5Fdh9JDZKDw08a5LtmHEjfqfA7ms/Y50uoDjeYO0T3
JaI/ONGbOGqRQ5vcedpI/BWRVub8O1crx8d2lhsAVkScdT4mZ2PYYJbBbQ8PApAvF
nEBsO6oevyEWs3jo3YXMU7p5Pyp+pMi8ab2n87DkLKpRo++JBdEKdb0aepR4pahRK
/Y0fFfTqgjyf/vw+eAEThQzcSw7cAY4yVJnR4uf/oQMzAnm2dOCy7o2lQlz9f6n2P
B8CsF2LnLos/hpmOVyf81LCek7I9kgI2gvoVDQwgC8k/OjVeqg0K4/VtO9ETkXqNW
tyuXHDf2NVA1qwXxiwDrA/s05v4gg1L7lna9pJhf/bQb9jKfmK1l+fyAw0NIVRQSL
A==
</ViaThinkSoftSignature> */ ?>
<?php
 
/*
* VNag - Nagios Framework for PHP
* Developed by Daniel Marschall, ViaThinkSoft <www.viathinksoft.com>
* Licensed under the terms of the Apache 2.0 license
*
* Revision 2021-06-26
*/
 
declare(ticks=1);
 
require_once __DIR__ . '/../../framework/vnag_framework.inc.php';
require_once __DIR__ . '/NextCloudVersionCheck.class.php';
 
$job = new NextCloudVersionCheck();
$job->run();
unset($job);
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/trunk/plugins/nextcloud_version/icinga2.conf
0,0 → 1,48
// Put this file in /etc/icinga2/conf.d/...
 
// VNag - Nagios Framework for PHP
// Developed by Daniel Marschall, ViaThinkSoft <www.viathinksoft.com>
// Licensed under the terms of the Apache 2.0 license
//
// Revision 2021-06-26
 
object CheckCommand "vnag_nextcloud_version" {
command = [ "/daten/vnag/plugins/nextcloud_version/check_nextcloud_version" ]
 
arguments = {
"-d" = {
value = "$vnag_nextcloud_version_dir$"
description = "Location where the Nextcloud installation is located"
required = true
}
}
}
 
// Example usage:
//
// apply Service "example_website1_nextcloud_version" {
// import "generic-service"
// check_command = "vnag_nextcloud_version"
// vars = {
// vnag_nextcloud_version_dir = "/var/www/website1/nextcloud/"
// }
// assign where host.name == NodeName
// }
//
// apply Service "example_website2_nextcloud_version" {
// import "generic-service"
// check_command = "vnag_nextcloud_version"
// vars = {
// vnag_nextcloud_version_dir = "/var/www/website2/nextcloud/"
// }
// assign where host.name == NodeName
// }
//
// apply Service "example_website3_nextcloud_version" {
// import "generic-service"
// check_command = "vnag_nextcloud_version"
// vars = {
// vnag_nextcloud_version_dir = "/var/www/website3/nextcloud/"
// }
// assign where host.name == NodeName
// }
/trunk/plugins/owncloud_version/OwnCloudVersionCheck.class.php
0,0 → 1,122
<?php /* <ViaThinkSoftSignature>
TAItYQDND8ibGUd1YC/f04SIIzeSm99JNg+mmSjefJjt841dZ7o9BCrAGDh2jiv+7
akv0WmInOLOjoJPsglVIAEEBh/SfaxvzGfprA8vj54DZ11seUBF7jXUy+WCVapBke
yAGvtEAIZ5gToiyzs0aE94svxZZfpC7clFRhqON5u1XMZhdSsVgEfzJcIJroq35NE
2IRUebM4La1mBuopQWwx6FSFuxUjwcn7Q/zUP1rCwU8VAL/ycbG10FGNtYU14sOXl
ymQoh2A2ODFO2LYpMxh+7vHASw2Nnk6BhuvQAwM3C+SBW56SkWZK/JkRXLN9NoqKk
5uxSC6YUlsi1OPJULaVWOoBvjUIau809jeeW72COFRjZKkX266Rv7mm6wrcxoOIXh
Cj+m2bP42thx+Df1i4/CFFsxg/sHvorkwS+6B+0kGl1+2Ghwx3L94F+ThJxWtGOhM
Jawl3weaWZuojsU79HRnqBK+Yy8Shuzq/k+FonrJE4FE4oogIf7pzXGKOqXvjtXxG
DoWCa/hotEFcs+mCYeAAjpDf2V8qSFKT2odHjJwLklKpIov+Tlr/XtMrZtCIDjDh3
KBH6/9+8Bw5S5nFGvNfThSihlWKloqvysKDiCxIaLCOszzWNgsUUbUgppv2NFFzso
QkJ22yObljS6p47cYnNmd5Pp3q9+JCTn5epn+XP4RRN3Z+ax7tiusqqVnlik0pwb3
+9Yrl4Pq4QkloolrEnsQtyy3xlrk53fVCWoA3aLNcYVHN8Nl4OjyIEImLbkNPddHz
RUqGSNgoEZDKKbfi7i52VssHWzv/9HzHvNpoThbln8C3q8WFlgnuSStpwZSonZEPo
9wvnVo8orJjLzflkjPtBLIS7EL+R66RqpP3PF1lTi4Xl6fh9BFxif9juBSsCaJAjV
H0YECXyGiNPb1XcUXrDhWUrCViloHDq6sEQgW64s33SGqksFXG6IN/NV+54mW0hG4
PUzIZ6Bgu9HggpfgFSAuzAW5xTMq/ng19pjo9y7cdeSnMF43BPhg3SSdvX2W8oRn1
Fv5BHbsvw5vvHJUf+kUA5YN0IRUtOmoDB2Z4kkzuP9VBLoqK9KWG9PXZ5sMWp6ib9
1KqMuFbx4y5NI9kjwhCQXuDAF2bJhtCHuPU+IyjhWqtFTWhD583AaHjt0gaVzkcuN
umskt4IR5Yqvo6oDtWCP7YRWJnzAFB9zDItFk1OjjomaSkKQvhztITWO4N3jmtonG
PkIUkR8DWEYLZUSP+zWV9UZ2yE5KYAwgXIstx2ovLSvV6f5kyz+z+x0sU7fo4m0qa
2HjjwaFSWf/yGHDkEch/5woquK4YWrrlFzCQZmhok6tSF8WS+eb6Ci4/wsCa1Znx4
w==
</ViaThinkSoftSignature> */ ?>
<?php
 
/*
* VNag - Nagios Framework for PHP
* Developed by Daniel Marschall, ViaThinkSoft <www.viathinksoft.com>
* Licensed under the terms of the Apache 2.0 license
*
* Revision 2021-06-26
*/
 
declare(ticks=1);
 
class OwnCloudVersionCheck extends VNag {
protected $argSystemDir = null;
 
public function __construct() {
parent::__construct();
 
$this->registerExpectedStandardArguments('Vvht');
 
$this->getHelpManager()->setPluginName('check_owncloud_version');
$this->getHelpManager()->setVersion('1.0');
$this->getHelpManager()->setShortDescription('This plugin checks if a local ownCloud system has the latest version installed.');
$this->getHelpManager()->setCopyright('Copyright (C) 2011-$CURYEAR$ Daniel Marschall, ViaThinkSoft.');
$this->getHelpManager()->setSyntax('$SCRIPTNAME$ [-d <directory>]');
$this->getHelpManager()->setFootNotes('If you encounter bugs, please contact ViaThinkSoft at www.viathinksoft.com');
 
// Individual (non-standard) arguments:
$this->addExpectedArgument($this->argSystemDir = new VNagArgument('d', 'directory', VNagArgument::VALUE_REQUIRED, 'ownCloudPath', 'The local directory where your ownCloud installation is located.'));
}
 
protected function get_owncloud_version($local_path) {
$local_path = realpath($local_path) === false ? $local_path : realpath($local_path);
 
if (!file_exists($local_path . '/version.php')) {
throw new Exception('This is not a valid ownCloud installation in "'.$local_path.'".');
}
 
// TODO: this is a security vulnerability if an non-root user can control the input of version.php !
$vendor = 'unknown';
$OC_Version = array(0,0,0,0);
$OC_VersionString = 'unknown';
$OC_Edition = 'unknown';
$OC_Channel = 'unknown';
$OC_Build = 'unknown';
include $local_path . '/version.php';
 
if ($vendor != 'owncloud') {
throw new Exception('This is not a valid ownCloud installation in "'.$local_path.'". It is "$vendor".');
}
 
// Owncloud\Updater\Utils\Fetcher::DEFAULT_BASE_URL
$baseUrl = 'https://updates.owncloud.com/server/';
 
$update_url = $baseUrl . '?version='.
implode('x', $OC_Version).'x'.
'installedatx'.
'lastupdatedatx'.
$OC_Channel.'x'.
$OC_Edition.'x'.
urlencode($OC_Build);
 
$cont = file_get_contents($update_url);
if ($cont === false) {
throw new Exception('Could not determinate current ownCloud version in "'.$local_path.'".');
}
 
if ($cont === '') {
return array($OC_VersionString, $OC_VersionString, $OC_Channel);
} else {
$xml = simplexml_load_string($cont);
$new_ver = (string)$xml->version;
return array($OC_VersionString, $new_ver, $OC_Channel);
}
}
 
protected function cbRun($optional_args=array()) {
$system_dir = $this->argSystemDir->getValue();
if (empty($system_dir)) {
throw new Exception("Please specify the directory of the ownCloud installation.");
}
$system_dir = realpath($system_dir) === false ? $system_dir : realpath($system_dir);
 
if (!is_dir($system_dir)) {
throw new Exception('Directory "'.$system_dir.'" not found.');
}
 
list($cur_ver, $new_ver, $channel) = $this->get_owncloud_version($system_dir);
 
if ($cur_ver === $new_ver) {
$this->setStatus(VNag::STATUS_OK);
$this->setHeadline("ownCloud version $cur_ver [$channel] is the latest available version for your ownCloud installation at $system_dir", true);
} else {
$this->setStatus(VNag::STATUS_WARNING);
$this->setHeadline("ownCloud version $cur_ver [$channel] is outdated. Newer version is $new_ver [$channel] for installation at $system_dir", true);
}
}
}
/trunk/plugins/owncloud_version/check_owncloud_version
0,0 → 1,43
#!/usr/bin/php
<?php /* <ViaThinkSoftSignature>
C8ziYFJVvL1j9eszK/hs4hYz6Zx8VBjTdnXuK2EppVkMjBsXzubVa5xIbZo5Cx676
Ba6UaN4aRBU/OIbgLuMHYF4p4TN8TFLkwq++A2Qdme6ZCcRVFtoTst2o2tBedsHRx
5UKWJZX1kt0O9JnUVZr5Nr8gnld9YkOlAFYK36Y8jpQb2g8ShzxITC50ZtgzWaWm9
KwfeZQLucwCTuz1zbZN813V0G2nMqNL7LyJrVNYQ7j7g/ptl/PrhCcVBTpNNWaQDf
JLNwO4nxAU7J8WMeAZ5tQpXV58fNso8rmmconNXkfS28hhCk4S7mmBYVMYYnxA56A
owc/8LO/YXwpVbsqYZxcKhyA8MS1Zzt/Tt7JFGQactwJr3t3bPwoKODpYhkrtIHAS
2/BzaX5pdZfgLrI0jfZTJDFIPdjWtbkTGBqPdBQmXyB8Rmbg/y8QdwJwZeLikiYMq
C80WqpgQQ9EGhIs3K0+00m1qYC9pIpm7cMMWPB9WNYnOoPH/RWnKid9pc1mIfBq4Q
PNDNbAx9yqYBGh0Sbb9oPb4CW1BNHBNI6mFku/o/3wUyrr8leCv68BSEX4RaSh4Nn
9uD0Qu+qKJhTvRqhdY9dZiIIMwXTo0G4AJRNe67lTJCxFbALoVwV0xuUuDmbgj0n8
L7JatJsPO6wgSP21B57jhFOBLueOJBxDHhWfG0N3LmV9Qo904gNIoz98Gwo4y1Gga
nBzYP9YNbuvghGS6Gcq2zCBBGO53A0KeLpkCc9dV3+9Sf5tDmbfG+ImCF4rzGwybZ
Gs3VQCa3rFYB5pCnlyhX3IuR9nbxT1V0xRXPbon+hEIMAmEVhKUYJK5mm3xDQq+Rx
9oxl9h1RnedNmZvHsXeSSSw+61Hgu9fw7uLE/HNcB7mvDULM+du5SrOBaS9h5/pW8
qIC5S92WefSAY+1L7RYW+x9YPWOYz7kah66MToTndmL4iHXYS9UTFPTB9x6rxpARy
KY9/4TgzqzMlMsu1IF0PI9B16/owuE/4zdJ+NktNqBTETV9bgOlgF8/+mtm9wGVWR
gSOIrbvIrKkTk6T90TsCGusNFyfdlXPl3kODpCMBAKqhsTCN2l9VChe+Lug2okX1p
CAZJfJWG40d/8mKCOcrlOIVkl8JnaT2sNYgk046ONV71rTNRLzKvKV4OrnOt7U56O
zW0vZQRfq/7CkXErksDRscf62cAyjuLqsoWzfgtfZP/zQl3h5HMXL9KI1nGGLvpb5
PazlCctaq9mdnVWpaZdjPNsfdht3mry3pzAsr1E2Uu2+/vAurE55L2Dyim/IPXn6Z
bEi53N0V6/ETEsqYp2RHZHCi/ycAG7gOnsypFbUU+vMVQGqZQ3eIpXVTQ2hpw1zOM
A==
</ViaThinkSoftSignature> */ ?>
<?php
 
/*
* VNag - Nagios Framework for PHP
* Developed by Daniel Marschall, ViaThinkSoft <www.viathinksoft.com>
* Licensed under the terms of the Apache 2.0 license
*
* Revision 2021-06-26
*/
 
declare(ticks=1);
 
require_once __DIR__ . '/../../framework/vnag_framework.inc.php';
require_once __DIR__ . '/OwnCloudVersionCheck.class.php';
 
$job = new OwnCloudVersionCheck();
$job->run();
unset($job);
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/trunk/plugins/owncloud_version/icinga2.conf
0,0 → 1,48
// Put this file in /etc/icinga2/conf.d/...
 
// VNag - Nagios Framework for PHP
// Developed by Daniel Marschall, ViaThinkSoft <www.viathinksoft.com>
// Licensed under the terms of the Apache 2.0 license
//
// Revision 2021-06-26
 
object CheckCommand "vnag_owncloud_version" {
command = [ "/daten/vnag/plugins/owncloud_version/check_owncloud_version" ]
 
arguments = {
"-d" = {
value = "$vnag_owncloud_version_dir$"
description = "Location where the ownCloud installation is located"
required = true
}
}
}
 
// Example usage:
//
// apply Service "example_website1_owncloud_version" {
// import "generic-service"
// check_command = "vnag_owncloud_version"
// vars = {
// vnag_owncloud_version_dir = "/var/www/website1/owncloud/"
// }
// assign where host.name == NodeName
// }
//
// apply Service "example_website2_owncloud_version" {
// import "generic-service"
// check_command = "vnag_owncloud_version"
// vars = {
// vnag_owncloud_version_dir = "/var/www/website2/owncloud/"
// }
// assign where host.name == NodeName
// }
//
// apply Service "example_website3_owncloud_version" {
// import "generic-service"
// check_command = "vnag_owncloud_version"
// vars = {
// vnag_owncloud_version_dir = "/var/www/website3/owncloud/"
// }
// assign where host.name == NodeName
// }