From ee9605f264376c83f0d00d8125d941613759ad05 Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Sun, 15 Nov 2026 01:36:10 -0800 Subject: [PATCH 1/2] feat: ship the DigitalOcean Cacti templates and import them on install The catalog now names its graphs: each metric and each resource type's collection age sits in exactly one graph. tests/bin/generate-templates.php turns that into Cacti template XML laid out like Cacti's own export: a "Cloud: DigitalOcean Scope" device template, a script server data query per resource type, and a data template and graph template per graph, so a graph's data source holds only its own metrics (ADR 0005). Every hash is fixed, so a re-import updates the objects it created. Install and upgrade copy the data query definitions into /resource/script_server, where Cacti 1.2 requires them, and import the package under a lock when it changed or an object is missing. A failed import is logged and does not hold back the install. Unit tests compare the shipped XML with the generator's output and check the installer's decisions. Integration tests import into a real Cacti and show a re-import adds no rows and a deleted graph template is restored. Closes #42 Signed-off-by: Thomas Vincent --- REUSE.toml | 1 + docs/PLAN.md | 6 +- lib/DigitalOceanCatalog.php | 47 + lib/TemplateRepository.php | 138 + lib/Templates.php | 171 + setup.php | 78 +- templates/cloud_digitalocean.xml | 4948 +++++++++++++++++ templates/resource/cloud_do_droplet.xml | 92 + templates/resource/cloud_do_load_balancer.xml | 112 + tests/Integration/TemplatesTest.php | 85 + tests/Unit/TemplateInstallTest.php | 198 + tests/Unit/TemplatesTest.php | 121 + tests/bin/generate-templates.php | 526 ++ tests/bin/lifecycle.php | 72 + 14 files changed, 6591 insertions(+), 4 deletions(-) create mode 100644 lib/TemplateRepository.php create mode 100644 lib/Templates.php create mode 100644 templates/cloud_digitalocean.xml create mode 100644 templates/resource/cloud_do_droplet.xml create mode 100644 templates/resource/cloud_do_load_balancer.xml create mode 100644 tests/Integration/TemplatesTest.php create mode 100644 tests/Unit/TemplateInstallTest.php create mode 100644 tests/Unit/TemplatesTest.php create mode 100644 tests/bin/generate-templates.php diff --git a/REUSE.toml b/REUSE.toml index 8d208f1..5979ddc 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -17,6 +17,7 @@ path = [ "phpunit-integration.xml", "locales/po/**", "locales/LC_MESSAGES/**", + "templates/**", ] precedence = "aggregate" SPDX-FileCopyrightText = "2026 Thomas Vincent " diff --git a/docs/PLAN.md b/docs/PLAN.md index 876bdc3..317b761 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -220,13 +220,13 @@ The mapping, decided in [ADR 0010](decisions/0010-scope-devices-with-resource-da | Object | Created from | Notes | |---|---|---| -| Scope device | "Cloud Scope" device template; each device created with availability method None (`AVAIL_NONE`, 0) and the account's poller, because a Cacti 1.2 device template has no availability field | One per account and scope: a DigitalOcean team, an AWS account and region, a Google Cloud project, an Azure subscription and region | +| Scope device | A device template per provider, for example "Cloud: DigitalOcean Scope", carrying that provider's data queries; each device created with availability method None (`AVAIL_NONE`, 0) and the account's poller, because a Cacti 1.2 device template has no availability field | One per account and scope: a DigitalOcean team, an AWS account and region, a Google Cloud project, an Azure subscription and region | | Resource data query | Script server data query per resource type, for example "Cloud: DigitalOcean Droplets" | Indexes are provider resource IDs; descriptions are resource names; reindexing follows Cacti's normal behavior | -| Data sources and graphs | Data and graph templates per resource type, generated from the metric catalog | Polled through the script server; reach Thold through `poller_output` | +| Data sources and graphs | A data template and a graph template per catalog graph, generated from the metric catalog | A graph's data source holds only that graph's metrics, so creating a graph collects nothing else ([ADR 0005](decisions/0005-collect-only-what-is-graphed.md)); polled through the script server; reach Thold through `poller_output` | This follows plugin_cloudflare's pattern of one account device with resources as data query indexes. It keeps device counts proportional to accounts, not to resources, and Cacti's reindexing handles resources that come and go. The cost is that Maint suppresses a whole scope, not one resource, and a virtual machine's cloud graphs do not sit on the Cacti device that polls the same machine over SNMP. Mapping resources onto existing devices is a research issue. -Templates ship as Cacti template XML in the plugin and are imported with `import_xml_data()` at install and upgrade, matched by hash so re-imports update rather than duplicate. +Templates ship as Cacti template XML in `templates/`, generated from the catalog by `php tests/bin/generate-templates.php templates`; a unit test fails when the shipped files and the catalog disagree. Install and upgrade import them with `import_xml_data()` when the package changed or an object is missing, matched by fixed hashes so re-imports update rather than duplicate. Each data query definition is copied into `/resource/script_server/`, because Cacti 1.2 refuses a data query file outside `/resource`; uninstall leaves the templates and those files, because devices and graphs may still use them. ## Collection and measurement state diff --git a/lib/DigitalOceanCatalog.php b/lib/DigitalOceanCatalog.php index 1b02c4c..a85c872 100644 --- a/lib/DigitalOceanCatalog.php +++ b/lib/DigitalOceanCatalog.php @@ -84,6 +84,46 @@ final class DigitalOceanCatalog { 'dolb_queue' => [self::LOAD_BALANCER, 'droplets_queue_size', [], 'single', false], ]; + /** + * The data source name of each resource type's collection age, which the + * script server computes from the cache (ADR 0006); no API request reads it. + */ + public const AGE = [self::DROPLET => 'do_age', self::LOAD_BALANCER => 'dolb_age']; + + /** + * Graph templates: key => [type, title, vertical label, upper limit or + * null, data source names]. Each graph gets its own data template, so a + * graph collects only its own metrics (ADR 0005). Every metric and age + * name appears in exactly one graph; a template test checks it. + * + * @var array}> + */ + public const GRAPHS = [ + 'do_cpu' => [self::DROPLET, 'CPU', 'percent', 100, ['do_cpu_pct']], + 'do_bandwidth' => [self::DROPLET, 'Bandwidth', 'bits per second', null, [ + 'do_bw_pub_in', 'do_bw_pub_out', 'do_bw_prv_in', 'do_bw_prv_out', + ]], + 'do_load' => [self::DROPLET, 'Load Average', 'load', null, ['do_load_1', 'do_load_5', 'do_load_15']], + 'do_memory' => [self::DROPLET, 'Memory', 'bytes', null, [ + 'do_mem_total', 'do_mem_avail', 'do_mem_free', 'do_mem_cached', + ]], + 'do_age' => [self::DROPLET, 'Collection Age', 'seconds', null, ['do_age']], + 'dolb_connections' => [self::LOAD_BALANCER, 'Connections', 'connections', null, ['dolb_conn_cur', 'dolb_conn_lim']], + 'dolb_cpu' => [self::LOAD_BALANCER, 'CPU', 'percent', 100, ['dolb_cpu_pct']], + 'dolb_http_rps' => [self::LOAD_BALANCER, 'HTTP Requests', 'requests per second', null, ['dolb_http_rps']], + 'dolb_http_resp' => [self::LOAD_BALANCER, 'HTTP Responses', 'responses', null, ['dolb_http_resp']], + 'dolb_throughput' => [self::LOAD_BALANCER, 'Throughput', 'bytes per second', null, [ + 'dolb_http_Bps', 'dolb_tcp_Bps', 'dolb_udp_Bps', 'dolb_nlbtcp_Bps', 'dolb_nlbudp_Bps', + ]], + 'dolb_health' => [self::LOAD_BALANCER, 'Health Checks', 'status', null, ['dolb_hc_status']], + 'dolb_downtime' => [self::LOAD_BALANCER, 'Downtime', 'status', null, ['dolb_downtime']], + 'dolb_response' => [self::LOAD_BALANCER, 'Response Time', 'seconds', null, ['dolb_resp_avg_s', 'dolb_resp_p95_s']], + 'dolb_backend' => [self::LOAD_BALANCER, 'Droplet Connections', 'connections', null, [ + 'dolb_back_conn', 'dolb_queue', + ]], + 'dolb_age' => [self::LOAD_BALANCER, 'Collection Age', 'seconds', null, ['dolb_age']], + ]; + private const FIELDS = ['type', 'path', 'query', 'convert', 'agent']; /** @@ -93,6 +133,13 @@ public static function metric(string $name): ?array { return isset(self::METRICS[$name]) ? self::named(self::METRICS[$name]) : null; } + /** + * @return list every metric name of the catalog, in catalog order + */ + public static function names(): array { + return array_keys(self::METRICS); + } + /** * Metrics read by default for a resource type: those that need no agent. * diff --git a/lib/TemplateRepository.php b/lib/TemplateRepository.php new file mode 100644 index 0000000..4b7277f --- /dev/null +++ b/lib/TemplateRepository.php @@ -0,0 +1,138 @@ + + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This file is part of plugin_cloud, a plugin for Cacti. + * https://github.com/somethingwithproof/plugin_cloud + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ +namespace Somethingwithproof\Cloud; + +/** + * The database side of the shipped Cacti templates: the import lock, the + * checksum of the last imported package, and the imported objects, found by + * the fixed hashes tests/bin/generate-templates.php gives them (ADR 0010). + */ +final class TemplateRepository { + private const SETTING = 'cloud_templates_sha256'; + private const LOCK = 'plugin_cloud_templates'; + + public function __construct(private readonly \PDO|false $connection) { + } + + /** + * Two processes importing at once would create every object twice. The + * lock is per connection, so it ends with the request at the latest. + */ + public function lock(int $timeout): bool { + $locked = db_fetch_cell_prepared('SELECT GET_LOCK(?, ?)', [self::LOCK, $timeout], '', true, $this->connection); + + return (string) $locked === '1'; + } + + public function unlock(): void { + db_execute_prepared('DO RELEASE_LOCK(?)', [self::LOCK], true, $this->connection); + } + + public function recordedChecksum(): string { + $value = db_fetch_cell_prepared( + 'SELECT value FROM settings WHERE name = ?', + [self::SETTING], + '', + true, + $this->connection + ); + + return is_string($value) ? $value : ''; + } + + public function recordChecksum(string $sha256): void { + db_execute_prepared( + 'REPLACE INTO settings (name, value) VALUES (?, ?)', + [self::SETTING, $sha256], + true, + $this->connection + ); + } + + public function defaultProfile(): int { + $id = db_fetch_cell_prepared( + "SELECT id FROM data_source_profiles WHERE `default` = 'on'", + [], + '', + true, + $this->connection + ); + + return is_numeric($id) ? (int) $id : 0; + } + + /** + * Every object the package defines, as table => keys. A missing one means + * the import failed or an administrator deleted it. + * + * @return array> + */ + public static function objects(): array { + $objects = [ + 'host_template' => ['host_template/digitalocean'], + 'snmp_query' => [], + 'data_template' => [], + 'graph_templates' => [], + 'snmp_query_graph' => [], + ]; + + foreach ([DigitalOceanCatalog::DROPLET, DigitalOceanCatalog::LOAD_BALANCER] as $type) { + $objects['snmp_query'][] = 'data_query/' . $type; + } + + foreach (array_keys(DigitalOceanCatalog::GRAPHS) as $key) { + $objects['data_template'][] = 'data_template/' . $key; + $objects['graph_templates'][] = 'graph_template/' . $key; + $objects['snmp_query_graph'][] = 'data_query_graph/' . $key; + } + + return $objects; + } + + public static function hash(string $key): string { + return md5('plugin_cloud/' . $key); + } + + /** + * @return list the keys of package objects not in the database + */ + public function missing(): array { + $missing = []; + + // The table names come from objects(), never from input. + foreach (self::objects() as $table => $keys) { + $hashes = array_map(self::hash(...), $keys); + $found = db_fetch_assoc_prepared( + 'SELECT hash FROM `' . $table . '` WHERE hash IN (' . implode(', ', array_fill(0, count($hashes), '?')) . ')', + $hashes, + true, + $this->connection + ); + $have = array_column(is_array($found) ? $found : [], 'hash'); + + foreach ($keys as $i => $key) { + if (!in_array($hashes[$i], $have, true)) { + $missing[] = $key; + } + } + } + + return $missing; + } +} diff --git a/lib/Templates.php b/lib/Templates.php new file mode 100644 index 0000000..b1477da --- /dev/null +++ b/lib/Templates.php @@ -0,0 +1,171 @@ + + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This file is part of plugin_cloud, a plugin for Cacti. + * https://github.com/somethingwithproof/plugin_cloud + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ +namespace Somethingwithproof\Cloud; + +/** + * Installs the shipped Cacti templates (REQ-OBJ-001, REQ-OBJ-002): copies + * each data query definition into Cacti's resource directory, then imports + * the package when it changed since the last import or an object is + * missing. The package's fixed hashes make a re-import update the objects + * it already created, never duplicate them. + * + * Install and upgrade call this. A failure is logged and returns false; the + * caller does not hold back the install, because retrying a failing import + * on every page would cost more than it could fix. + */ +final class Templates { + public const PACKAGE = 'cloud_digitalocean.xml'; + + /** + * @param string $source the plugin's templates directory + * @param string $resourcePath /resource/script_server + * @param \Closure(string, int): bool $import runs Cacti's importer on the + * package XML with a data source profile, true when every object saved + */ + public function __construct( + private readonly TemplateRepository $repository, + private readonly string $source, + private readonly string $resourcePath, + private readonly \Closure $import, + ) { + } + + /** + * True when the shipped package is the one last imported. Cheap enough + * for the upgrade check: one file read and one settings row. + */ + public function isCurrent(): bool { + $xml = @file_get_contents($this->source . '/' . self::PACKAGE); + + return $xml !== false && $this->repository->recordedChecksum() === hash('sha256', $xml); + } + + public function install(int $lockTimeout = 10): bool { + if (!is_dir($this->resourcePath)) { + Log::error('Templates not installed: the Cacti resource directory is missing'); + + return false; + } + + if (!$this->repository->lock($lockTimeout)) { + Log::warning('Template import deferred: another process holds the template lock'); + + return false; + } + + try { + return $this->installLocked(); + } catch (\Throwable $e) { + Log::error('Template import failed (' . $e::class . ')'); + + return false; + } finally { + $this->repository->unlock(); + } + } + + private function installLocked(): bool { + foreach (glob($this->source . '/resource/*.xml') ?: [] as $file) { + if (!$this->copy($file, $this->resourcePath . '/' . basename($file))) { + return false; + } + } + + $xml = @file_get_contents($this->source . '/' . self::PACKAGE); + + if ($xml === false) { + Log::error('Template import failed: cannot read the package'); + + return false; + } + + $sha = hash('sha256', $xml); + + if ($this->repository->recordedChecksum() === $sha && $this->repository->missing() === []) { + return true; + } + + $profile = $this->repository->defaultProfile(); + + if ($profile === 0) { + Log::error('Template import skipped: no default data source profile'); + + return false; + } + + if (!($this->import)($xml, $profile)) { + Log::error('Template import failed: the importer reported an error'); + + return false; + } + + $missing = $this->repository->missing(); + + if ($missing !== []) { + Log::error('Template import failed: ' . count($missing) . ' objects missing after import'); + + return false; + } + + $this->repository->recordChecksum($sha); + + return true; + } + + /** + * Writes a temporary file beside the target and renames it over it, so + * the poller never reads a half-written definition. Mode 'x' refuses an + * existing name, so a planted link at the temporary path is not followed. + */ + private function copy(string $from, string $to): bool { + $content = @file_get_contents($from); + + if ($content === false) { + Log::error('Template import failed: cannot read ' . basename($from)); + + return false; + } + + if (!is_link($to) && is_file($to) && @file_get_contents($to) === $content) { + return true; + } + + $temp = dirname($to) . '/.' . basename($to) . '.' . bin2hex(random_bytes(8)); + $handle = @fopen($temp, 'xb'); + + if ($handle === false) { + Log::error('Template import failed: cannot write ' . basename($to)); + + return false; + } + + $written = fwrite($handle, $content); + $closed = fclose($handle); + + // fopen() honours the umask, and the poller may run as another user. + if ($written !== strlen($content) || !$closed || !@chmod($temp, 0644) || !@rename($temp, $to)) { + @unlink($temp); + Log::error('Template import failed: cannot write ' . basename($to)); + + return false; + } + + return true; + } +} diff --git a/setup.php b/setup.php index 4dbece9..5160ed4 100644 --- a/setup.php +++ b/setup.php @@ -215,7 +215,12 @@ function plugin_cloud_upgrade(bool $grant = false): bool { $info = plugin_cloud_version(); $schema = new \Somethingwithproof\Cloud\Schema(false); - if ($schema->isCurrent() && $schema->recordedPluginVersion() === $info['version'] && $schema->hooksRegistered()) { + if ( + $schema->isCurrent() + && $schema->recordedPluginVersion() === $info['version'] + && $schema->hooksRegistered() + && cloud_templates()->isCurrent() + ) { return true; } @@ -227,6 +232,9 @@ function plugin_cloud_upgrade(bool $grant = false): bool { cloud_setup_hooks($grant); + // A failed import is logged and does not hold back the version (see Templates). + cloud_setup_templates(); + $schema->recordPluginVersion($info['version'], $info['author'], $info['homepage']); return true; @@ -256,6 +264,74 @@ function cloud_setup_hooks(bool $grant = false): void { } } +/** + * Import the shipped device, data query, data and graph templates. + */ +function cloud_setup_templates(int $lockTimeout = 10): bool { + global $config; + + // templates_import.php loads the same three: import.php calls + // retemplate_graphs() and update_replication_crc() from the other two. + $libraries = array( + 'import_xml_data' => 'import.php', + 'retemplate_graphs' => 'template.php', + 'update_replication_crc' => 'utility.php', + ); + + foreach ($libraries as $function => $file) { + if (!function_exists($function)) { + include_once($config['library_path'] . '/' . $file); + } + } + + return cloud_templates()->install($lockTimeout); +} + +function cloud_templates(): \Somethingwithproof\Cloud\Templates { + global $config; + + return new \Somethingwithproof\Cloud\Templates( + new \Somethingwithproof\Cloud\TemplateRepository(false), + __DIR__ . '/templates', + $config['base_path'] . '/resource/script_server', + function (string $xml, int $profile): bool { + return cloud_import_templates($xml, $profile); + } + ); +} + +/** + * import_xml_data() reports problems three ways, none of them through + * is_error_message(): it returns false or an empty array, it queues + * messages in the global $import_messages, and it marks an object it could + * not save with a result other than 'success'. All three are checked here; + * Templates then checks that every object resolves by hash. + */ +function cloud_import_templates(string $xml, int $profile): bool { + global $import_messages; + + $import_messages = array(); + $results = import_xml_data($xml, false, $profile); + + if (!is_array($results) || $results === array() || count($import_messages) > 0) { + return false; + } + + foreach ($results as $type => $items) { + if ($type === 'files' || !is_array($items)) { + continue; + } + + foreach ($items as $item) { + if (!is_array($item) || !isset($item['result']) || $item['result'] !== 'success') { + return false; + } + } + } + + return true; +} + /** * Uninstall never touches cloud resources or provider accounts. Core drops * the tracked plugin tables afterwards unless the administrator left "Keep diff --git a/templates/cloud_digitalocean.xml b/templates/cloud_digitalocean.xml new file mode 100644 index 0000000..348e788 --- /dev/null +++ b/templates/cloud_digitalocean.xml @@ -0,0 +1,4948 @@ + + + Cloud: DigitalOcean Scope + application + + hash_0401035bfa70d4a716dcd2e0fc68fb5e0c8063|hash_04010365a822eecf68dba160fe5110fb4ed959 + + + Cloud: DigitalOcean Droplets - CPU + + + + + |host_description| - |query_resourceName| - CPU + + percent + + 3 + + 200 + + 700 + + 1000 + + on + + + + 2 + + + + + + on + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_0801034386c404e78b9a77be5346a8dd3019b1 + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + do_cpu_pct + + 1.00 + + 0 + 1 + + + 9 + hash_0801034386c404e78b9a77be5346a8dd3019b1 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_0801034386c404e78b9a77be5346a8dd3019b1 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_0801034386c404e78b9a77be5346a8dd3019b1 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + + + Data Source [do_cpu_pct] + + task_item_id + hash_00010376ba134b5928a305737d016fbe7337c9|hash_000103ad5af9388d93e34428c56d3b2b934021|hash_00010358ebadadd79faabf785ddc7b4aee9402|hash_000103bdc13f199ec98b240548b17cf0f0e431 + + + + + Cloud: DigitalOcean Droplets - Bandwidth + + + + + |host_description| - |query_resourceName| - Bandwidth + + bits per second + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_08010315815af0359dda45dd27be828b7f888c + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + do_bw_pub_in + + 1.00 + + 0 + 1 + + + 9 + hash_08010315815af0359dda45dd27be828b7f888c + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_08010315815af0359dda45dd27be828b7f888c + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_08010315815af0359dda45dd27be828b7f888c + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + 4 + hash_080103b4012a74aa9256874cce00f892db8d2e + 00CF00 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + do_bw_pub_out + + 1.00 + + 0 + 5 + + + 9 + hash_080103b4012a74aa9256874cce00f892db8d2e + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 6 + + + 9 + hash_080103b4012a74aa9256874cce00f892db8d2e + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 7 + + + 9 + hash_080103b4012a74aa9256874cce00f892db8d2e + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 8 + + + 4 + hash_080103438da5042072e6fde5889555b6358eec + EA8F00 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + do_bw_prv_in + + 1.00 + + 0 + 9 + + + 9 + hash_080103438da5042072e6fde5889555b6358eec + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 10 + + + 9 + hash_080103438da5042072e6fde5889555b6358eec + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 11 + + + 9 + hash_080103438da5042072e6fde5889555b6358eec + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 12 + + + 4 + hash_080103abdf5479f3988a8f52fb0071b6b0940a + F51D30 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + do_bw_prv_out + + 1.00 + + 0 + 13 + + + 9 + hash_080103abdf5479f3988a8f52fb0071b6b0940a + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 14 + + + 9 + hash_080103abdf5479f3988a8f52fb0071b6b0940a + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 15 + + + 9 + hash_080103abdf5479f3988a8f52fb0071b6b0940a + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 16 + + + + + Data Source [do_bw_pub_in] + + task_item_id + hash_0001035fe856099239aafdc6694f2216611f81|hash_000103bb638e4efa5c87ba04018e6c875a2b95|hash_00010312ad84ecf6b9a5fde3c1ecba746e638b|hash_000103a02381c25a882ed29a48ff77676a01d0 + + + Data Source [do_bw_pub_out] + + task_item_id + hash_0001033fce49d75e660823b873d6f9e866da40|hash_000103d687f3c4b699fb64e7672c4daf70c1b4|hash_000103d914fad43fdfecc7140fd57c4b9105c1|hash_00010369965fd7c70e1ceaefe817740045fef1 + + + Data Source [do_bw_prv_in] + + task_item_id + hash_000103b956e81f86534f2525e939b58b5c715d|hash_0001032db69fed05d775a8f8afbc1f09877525|hash_00010312cc634280b2e39b3e3e2158bc80ceca|hash_00010333cd09dc44e09291682067e615861c2f + + + Data Source [do_bw_prv_out] + + task_item_id + hash_00010342d9115492d5d8d7a7123b3f3914c5ba|hash_0001038cded969bd22e7e5c3f44f5737eaf94e|hash_000103d9873e82c21636b300b85ccfe11b033b|hash_0001036f9fbc368594745c700599fd05c14156 + + + + + Cloud: DigitalOcean Droplets - Load Average + + + + + |host_description| - |query_resourceName| - Load Average + + load + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_080103db82538a096d38ff3cb779b61835fa67 + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + do_load_1 + + 1.00 + + 0 + 1 + + + 9 + hash_080103db82538a096d38ff3cb779b61835fa67 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_080103db82538a096d38ff3cb779b61835fa67 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_080103db82538a096d38ff3cb779b61835fa67 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + 4 + hash_080103bf75b68252e387259dd57016b0edafa9 + 00CF00 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + do_load_5 + + 1.00 + + 0 + 5 + + + 9 + hash_080103bf75b68252e387259dd57016b0edafa9 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 6 + + + 9 + hash_080103bf75b68252e387259dd57016b0edafa9 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 7 + + + 9 + hash_080103bf75b68252e387259dd57016b0edafa9 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 8 + + + 4 + hash_0801037c44f770c69bb104a0881d60f8716cf7 + EA8F00 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + do_load_15 + + 1.00 + + 0 + 9 + + + 9 + hash_0801037c44f770c69bb104a0881d60f8716cf7 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 10 + + + 9 + hash_0801037c44f770c69bb104a0881d60f8716cf7 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 11 + + + 9 + hash_0801037c44f770c69bb104a0881d60f8716cf7 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 12 + + + + + Data Source [do_load_1] + + task_item_id + hash_0001034b3e2032ba4cc0f7d726ceffb8a8649a|hash_000103ca0e5f7e3fa03b8a2e299047826d7717|hash_00010371bd8056c65664bc8ec81b6a299f2a1e|hash_000103f913b519f786145875f459de61cee327 + + + Data Source [do_load_5] + + task_item_id + hash_000103df36773ac7ba57349686a0275dc22238|hash_000103b3248cda539435d8fc4ed59ed143f017|hash_0001031d0da4e77bc56ac4df6aea25cc5f0921|hash_000103926a1ba91b00ded8f5d79ce946a76669 + + + Data Source [do_load_15] + + task_item_id + hash_00010370d23e61f6f31840f9ec976e68423bb5|hash_00010392d2d55dbccae335f5cc51d00e1e6165|hash_0001031a04751d45be9efe2ab94b9ed46906ce|hash_000103ab860d44a07c6be6b52a376b98de5ae1 + + + + + Cloud: DigitalOcean Droplets - Memory + + + + + |host_description| - |query_resourceName| - Memory + + bytes + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_080103071c9470d231ba7e986ce4eb3af669ba + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + do_mem_total + + 1.00 + + 0 + 1 + + + 9 + hash_080103071c9470d231ba7e986ce4eb3af669ba + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_080103071c9470d231ba7e986ce4eb3af669ba + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_080103071c9470d231ba7e986ce4eb3af669ba + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + 4 + hash_080103c256012a2342382020f35099cbbdec0d + 00CF00 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + do_mem_avail + + 1.00 + + 0 + 5 + + + 9 + hash_080103c256012a2342382020f35099cbbdec0d + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 6 + + + 9 + hash_080103c256012a2342382020f35099cbbdec0d + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 7 + + + 9 + hash_080103c256012a2342382020f35099cbbdec0d + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 8 + + + 4 + hash_08010310348b5e0f6d7dfc97406fa97b041a47 + EA8F00 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + do_mem_free + + 1.00 + + 0 + 9 + + + 9 + hash_08010310348b5e0f6d7dfc97406fa97b041a47 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 10 + + + 9 + hash_08010310348b5e0f6d7dfc97406fa97b041a47 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 11 + + + 9 + hash_08010310348b5e0f6d7dfc97406fa97b041a47 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 12 + + + 4 + hash_080103baab536c8205e475beaa2e152bbd7ad3 + F51D30 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + do_mem_cached + + 1.00 + + 0 + 13 + + + 9 + hash_080103baab536c8205e475beaa2e152bbd7ad3 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 14 + + + 9 + hash_080103baab536c8205e475beaa2e152bbd7ad3 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 15 + + + 9 + hash_080103baab536c8205e475beaa2e152bbd7ad3 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 16 + + + + + Data Source [do_mem_total] + + task_item_id + hash_0001030c25f0662920a2017a8dfb9ee4743843|hash_000103385bb175293d640467e2754c9505b3c4|hash_000103545765a193ba0eab5607bb2324783e39|hash_0001032d40f6f392a18a47ddd9ccdcfe874689 + + + Data Source [do_mem_avail] + + task_item_id + hash_0001033e1dbd50ba8ae16a064ec2c97fd7a6e0|hash_0001033ce4db073505fb7804756dcfc43e0dbf|hash_0001035399e27a438f8ebb556c43eeeb31392d|hash_000103c9fffdfdda7bcfb634385118573450e9 + + + Data Source [do_mem_free] + + task_item_id + hash_000103548fbfc96e53a0b72aed838966e00421|hash_0001035d4f77cdb80c19687bd2f0dab175eecb|hash_000103387aa70cb5d98a7494037bad5f3f477f|hash_00010309848484b425a73b6c5801188302ce20 + + + Data Source [do_mem_cached] + + task_item_id + hash_000103ea916c9efe58200637b4d065e68af6b9|hash_00010386feb492bba81316ace95cc65c86ae1e|hash_000103aa0281c4bce4cb6c23552cba2017978d|hash_000103d16fe1aa35a5a7c9d5e9125a8cccaa10 + + + + + Cloud: DigitalOcean Droplets - Collection Age + + + + + |host_description| - |query_resourceName| - Collection Age + + seconds + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_080103ec1614dd14f68e78b8fa6a83107cf301 + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + do_age + + 1.00 + + 0 + 1 + + + 9 + hash_080103ec1614dd14f68e78b8fa6a83107cf301 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_080103ec1614dd14f68e78b8fa6a83107cf301 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_080103ec1614dd14f68e78b8fa6a83107cf301 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + + + Data Source [do_age] + + task_item_id + hash_0001036a2c4e9c0afed36d761060ddac971a4d|hash_0001039b4d41cc21dc1b48e5344e96f23bc451|hash_000103c5ed2e4bdcfbe301fabdeb58206fbbcc|hash_00010359641c99ab8523c34d4eaf8eaa5aa1da + + + + + Cloud: DigitalOcean Load Balancers - Connections + + + + + |host_description| - |query_resourceName| - Connections + + connections + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_080103af0dc885a37f1885baa3746e2efbaf94 + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_conn_cur + + 1.00 + + 0 + 1 + + + 9 + hash_080103af0dc885a37f1885baa3746e2efbaf94 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_080103af0dc885a37f1885baa3746e2efbaf94 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_080103af0dc885a37f1885baa3746e2efbaf94 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + 4 + hash_08010328c03a47b34e3032f3c956549d6c608b + 00CF00 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_conn_lim + + 1.00 + + 0 + 5 + + + 9 + hash_08010328c03a47b34e3032f3c956549d6c608b + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 6 + + + 9 + hash_08010328c03a47b34e3032f3c956549d6c608b + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 7 + + + 9 + hash_08010328c03a47b34e3032f3c956549d6c608b + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 8 + + + + + Data Source [dolb_conn_cur] + + task_item_id + hash_0001031eaebdc3c2e6de3aa049411f96507ff9|hash_000103066552dec61cc3b6974f588af7086097|hash_00010377cd2be03729fa79fbb026cf0de4741d|hash_00010392248a974db16049085572126e8a0e8e + + + Data Source [dolb_conn_lim] + + task_item_id + hash_000103096a81e350412e25c0068620fb3f8c7c|hash_0001030559942b68d737a23d1ba04d9c3bfd39|hash_00010383eab3c7f9bb261c29043716e6b51787|hash_000103f90180c0641367160389a7e187cea5d5 + + + + + Cloud: DigitalOcean Load Balancers - CPU + + + + + |host_description| - |query_resourceName| - CPU + + percent + + 3 + + 200 + + 700 + + 1000 + + on + + + + 2 + + + + + + on + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_080103b4bfa3d1771c2f5f6a521a49682f594f + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_cpu_pct + + 1.00 + + 0 + 1 + + + 9 + hash_080103b4bfa3d1771c2f5f6a521a49682f594f + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_080103b4bfa3d1771c2f5f6a521a49682f594f + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_080103b4bfa3d1771c2f5f6a521a49682f594f + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + + + Data Source [dolb_cpu_pct] + + task_item_id + hash_000103ca76e6636cae01704f4b41c99c2fb1cd|hash_000103538a9b281e496a816d6231dee8ff8080|hash_00010314c2f7a06254d58cdba99141f2caf6be|hash_000103ef1f76937550bb17caf35cf50835b18f + + + + + Cloud: DigitalOcean Load Balancers - HTTP Requests + + + + + |host_description| - |query_resourceName| - HTTP Requests + + requests per second + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_0801033554656861fc21f55f146b2fda7fb4c5 + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_http_rps + + 1.00 + + 0 + 1 + + + 9 + hash_0801033554656861fc21f55f146b2fda7fb4c5 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_0801033554656861fc21f55f146b2fda7fb4c5 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_0801033554656861fc21f55f146b2fda7fb4c5 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + + + Data Source [dolb_http_rps] + + task_item_id + hash_00010390f6eb0675b8e73c7332acbd3a7e880d|hash_00010322817b3580d94b3b500fdd49ed6c3ff1|hash_0001038a4267969fe54e14c094c5d5a7c37a01|hash_000103c64cd01ae08db72e1ce7bc1e3cb81e84 + + + + + Cloud: DigitalOcean Load Balancers - HTTP Responses + + + + + |host_description| - |query_resourceName| - HTTP Responses + + responses + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_080103c837c84916127062033147fb69d430c1 + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_http_resp + + 1.00 + + 0 + 1 + + + 9 + hash_080103c837c84916127062033147fb69d430c1 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_080103c837c84916127062033147fb69d430c1 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_080103c837c84916127062033147fb69d430c1 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + + + Data Source [dolb_http_resp] + + task_item_id + hash_000103022caf942f53f8cf1a34377ee66564f9|hash_0001030dd0145ff27cff0327f3d910df7c6e49|hash_000103139a1d2a87398e44db789a6af6e1393f|hash_000103a09645bc2b03802c39f6bae32360982e + + + + + Cloud: DigitalOcean Load Balancers - Throughput + + + + + |host_description| - |query_resourceName| - Throughput + + bytes per second + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_08010304d94f156e617662058f507fd17aa8dd + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_http_Bps + + 1.00 + + 0 + 1 + + + 9 + hash_08010304d94f156e617662058f507fd17aa8dd + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_08010304d94f156e617662058f507fd17aa8dd + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_08010304d94f156e617662058f507fd17aa8dd + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + 4 + hash_080103c0e4a6d447e5be1180d3db907aef281b + 00CF00 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_tcp_Bps + + 1.00 + + 0 + 5 + + + 9 + hash_080103c0e4a6d447e5be1180d3db907aef281b + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 6 + + + 9 + hash_080103c0e4a6d447e5be1180d3db907aef281b + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 7 + + + 9 + hash_080103c0e4a6d447e5be1180d3db907aef281b + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 8 + + + 4 + hash_080103e9069fda9165ea96860ecf7b74964722 + EA8F00 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_udp_Bps + + 1.00 + + 0 + 9 + + + 9 + hash_080103e9069fda9165ea96860ecf7b74964722 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 10 + + + 9 + hash_080103e9069fda9165ea96860ecf7b74964722 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 11 + + + 9 + hash_080103e9069fda9165ea96860ecf7b74964722 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 12 + + + 4 + hash_080103ad694cf8f6cc1a787c33f7ca0aa00fbd + F51D30 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_nlbtcp_Bps + + 1.00 + + 0 + 13 + + + 9 + hash_080103ad694cf8f6cc1a787c33f7ca0aa00fbd + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 14 + + + 9 + hash_080103ad694cf8f6cc1a787c33f7ca0aa00fbd + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 15 + + + 9 + hash_080103ad694cf8f6cc1a787c33f7ca0aa00fbd + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 16 + + + 4 + hash_0801032a7fb385707dffed06f4fb4301d3cc3f + 8D00BA + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_nlbudp_Bps + + 1.00 + + 0 + 17 + + + 9 + hash_0801032a7fb385707dffed06f4fb4301d3cc3f + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 18 + + + 9 + hash_0801032a7fb385707dffed06f4fb4301d3cc3f + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 19 + + + 9 + hash_0801032a7fb385707dffed06f4fb4301d3cc3f + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 20 + + + + + Data Source [dolb_http_Bps] + + task_item_id + hash_000103dee6c82c405fcbbeed1043998a78a3a0|hash_0001033194aea9e95a6fb453891e63ed5e59a8|hash_000103a1bbc5c9d59c3cf76fa3a853e1eb07fd|hash_000103d55b95d9ce56b8ba0968ea16aa9f38a3 + + + Data Source [dolb_tcp_Bps] + + task_item_id + hash_000103678426e521a80c1bc25488a5491e11d8|hash_0001039b705a430e5edc0cc64e125a57178cc2|hash_0001039b5a69cf0ebf927264dd314f4831a33a|hash_0001030040a418e05f36d9dbc86dcebacb67a0 + + + Data Source [dolb_udp_Bps] + + task_item_id + hash_000103d682e5ba1ba97af5ae8f60b714bfe1c6|hash_000103428ae1d889efef9303d5a5a7a186f62e|hash_00010320a7b9cc95c9e70fee178f0d9a932157|hash_000103017e553fd0b3876fe874c5c6631e35b5 + + + Data Source [dolb_nlbtcp_Bps] + + task_item_id + hash_000103d3255984b07cb96ebaa8de764794d9fa|hash_0001034c10fd4b6c263547bc9d48d080cda500|hash_000103e5af46437832e584f65c87b3e84146de|hash_000103c4c67fcd3c9abb9af4be5e270cf3ae3b + + + Data Source [dolb_nlbudp_Bps] + + task_item_id + hash_00010356019f4d4c86fa18f1911f5c0237eacd|hash_000103b9d3bb2845da47b7da9c9e0355fcf7a7|hash_00010371a897f7fb333b4e3b2d6ccf2c0fbc29|hash_000103fd842b0f175b35435847870eebb386eb + + + + + Cloud: DigitalOcean Load Balancers - Health Checks + + + + + |host_description| - |query_resourceName| - Health Checks + + status + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_0801039dc83d3d932784e727329d5b2a2657fe + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_hc_status + + 1.00 + + 0 + 1 + + + 9 + hash_0801039dc83d3d932784e727329d5b2a2657fe + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_0801039dc83d3d932784e727329d5b2a2657fe + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_0801039dc83d3d932784e727329d5b2a2657fe + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + + + Data Source [dolb_hc_status] + + task_item_id + hash_00010342415d5e4cbcc4a4dd9f1043d7bc4eb4|hash_0001034215c01105c709afe2a9a88cce22d9d7|hash_000103b3d79555b629d088033b2697c10e255c|hash_00010341b16fecfd0429753a33d3dea6c91c14 + + + + + Cloud: DigitalOcean Load Balancers - Downtime + + + + + |host_description| - |query_resourceName| - Downtime + + status + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_080103c34f29ccdb91f4bf8080b9b1175eccd0 + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_downtime + + 1.00 + + 0 + 1 + + + 9 + hash_080103c34f29ccdb91f4bf8080b9b1175eccd0 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_080103c34f29ccdb91f4bf8080b9b1175eccd0 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_080103c34f29ccdb91f4bf8080b9b1175eccd0 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + + + Data Source [dolb_downtime] + + task_item_id + hash_000103ddb6ca95e134938cc9806f52b58ba9ad|hash_0001034c3aa9d051adbbbcade84f14c594ccd3|hash_000103afc3016649c536bb05d32c74978a22dc|hash_000103eea53edaf69e0d184dab4abb93b4e5f5 + + + + + Cloud: DigitalOcean Load Balancers - Response Time + + + + + |host_description| - |query_resourceName| - Response Time + + seconds + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_0801033e6006ed0f73462fd0257fabe92ecf4f + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_resp_avg_s + + 1.00 + + 0 + 1 + + + 9 + hash_0801033e6006ed0f73462fd0257fabe92ecf4f + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_0801033e6006ed0f73462fd0257fabe92ecf4f + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_0801033e6006ed0f73462fd0257fabe92ecf4f + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + 4 + hash_080103c0070b529ad5d8cf9e2f7fe632642f59 + 00CF00 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_resp_p95_s + + 1.00 + + 0 + 5 + + + 9 + hash_080103c0070b529ad5d8cf9e2f7fe632642f59 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 6 + + + 9 + hash_080103c0070b529ad5d8cf9e2f7fe632642f59 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 7 + + + 9 + hash_080103c0070b529ad5d8cf9e2f7fe632642f59 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 8 + + + + + Data Source [dolb_resp_avg_s] + + task_item_id + hash_000103b657cf6e26b802aac6c702c3d61d7431|hash_0001037c335727d54f9a75704f7f372d9d74b7|hash_00010309ce83e3158bcb28349ab90ab134fac3|hash_00010342f1613f0b9cdef1216b25a7658149a2 + + + Data Source [dolb_resp_p95_s] + + task_item_id + hash_00010366cd1e248cf0a2ee5f736291f7b57973|hash_00010370a2ff34117872e97985b777c1244e5b|hash_00010380078efa49181312efbd15606a7e8c39|hash_00010395c37d6a71ba4b674f79d347401841fd + + + + + Cloud: DigitalOcean Load Balancers - Droplet Connections + + + + + |host_description| - |query_resourceName| - Droplet Connections + + connections + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_0801038341453059c4388c97b6d2974d80505f + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_back_conn + + 1.00 + + 0 + 1 + + + 9 + hash_0801038341453059c4388c97b6d2974d80505f + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_0801038341453059c4388c97b6d2974d80505f + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_0801038341453059c4388c97b6d2974d80505f + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + 4 + hash_0801037db2d786f1323bbd4406f93c3f16b39a + 00CF00 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_queue + + 1.00 + + 0 + 5 + + + 9 + hash_0801037db2d786f1323bbd4406f93c3f16b39a + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 6 + + + 9 + hash_0801037db2d786f1323bbd4406f93c3f16b39a + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 7 + + + 9 + hash_0801037db2d786f1323bbd4406f93c3f16b39a + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 8 + + + + + Data Source [dolb_back_conn] + + task_item_id + hash_00010336458972503e732109ff5e9fa25e080f|hash_0001039a19500a41ba4ae6101eb410d398f96d|hash_00010322f31fbf59a1d90df9e01a709765f5e8|hash_0001030c58247eebf91d4a28c2dd91f6a21a52 + + + Data Source [dolb_queue] + + task_item_id + hash_000103f52730c57e48a4e66c31384756d29ca0|hash_0001034211ee595519638599c523ad43e357f1|hash_000103edf602c2d94e849e6a43f83250793533|hash_000103ac105f191f3700bcbfde25253188aeb3 + + + + + Cloud: DigitalOcean Load Balancers - Collection Age + + + + + |host_description| - |query_resourceName| - Collection Age + + seconds + + 3 + + 200 + + 700 + + 1000 + + on + + on + + 2 + + + + + + + + 100 + + 0 + + + + + + + + + + + + + + + + 0 + + 0 + + 0 + + on + + + + + + 40 + + 0 + + 0 + + + + 4 + hash_080103324e22df4d579128205db3058caa02e9 + 4668E4 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + dolb_age + + 1.00 + + 0 + 1 + + + 9 + hash_080103324e22df4d579128205db3058caa02e9 + 0 + FF + 4 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Cur: + + 0.00 + + 0 + 2 + + + 9 + hash_080103324e22df4d579128205db3058caa02e9 + 0 + FF + 1 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Avg: + + 0.00 + + 0 + 3 + + + 9 + hash_080103324e22df4d579128205db3058caa02e9 + 0 + FF + 3 + 0 + 0 + + + hash_060103e9c43831e54eca8069317a2ce8c6f751 + + Max: + on + 0.00 + + 0 + 4 + + + + + Data Source [dolb_age] + + task_item_id + hash_00010314384929acc6cc784e8b20570caa21ef|hash_000103b8d0847a4b95fc51c0c16197f960c924|hash_000103e745e2ac97e2eb2871a476facd5238cb|hash_0001031de6dbc81d12f0bcb4d4747e281aaf69 + + + + + Cloud: DigitalOcean Droplets - CPU + + + |host_description| - CPU + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + do_cpu_pct + + 0 + + 100 + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Droplets - Bandwidth + + + |host_description| - Bandwidth + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + do_bw_pub_in + + 0 + + U + + 1 + + 600 + + 0 + + + + do_bw_pub_out + + 0 + + U + + 1 + + 600 + + 0 + + + + do_bw_prv_in + + 0 + + U + + 1 + + 600 + + 0 + + + + do_bw_prv_out + + 0 + + U + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Droplets - Load Average + + + |host_description| - Load Average + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + do_load_1 + + 0 + + U + + 1 + + 600 + + 0 + + + + do_load_5 + + 0 + + U + + 1 + + 600 + + 0 + + + + do_load_15 + + 0 + + U + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Droplets - Memory + + + |host_description| - Memory + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + do_mem_total + + 0 + + U + + 1 + + 600 + + 0 + + + + do_mem_avail + + 0 + + U + + 1 + + 600 + + 0 + + + + do_mem_free + + 0 + + U + + 1 + + 600 + + 0 + + + + do_mem_cached + + 0 + + U + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Droplets - Collection Age + + + |host_description| - Collection Age + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + do_age + + 0 + + U + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Load Balancers - Connections + + + |host_description| - Connections + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + dolb_conn_cur + + 0 + + U + + 1 + + 600 + + 0 + + + + dolb_conn_lim + + 0 + + U + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Load Balancers - CPU + + + |host_description| - CPU + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + dolb_cpu_pct + + 0 + + 100 + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Load Balancers - HTTP Requests + + + |host_description| - HTTP Requests + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + dolb_http_rps + + 0 + + U + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Load Balancers - HTTP Responses + + + |host_description| - HTTP Responses + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + dolb_http_resp + + 0 + + U + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Load Balancers - Throughput + + + |host_description| - Throughput + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + dolb_http_Bps + + 0 + + U + + 1 + + 600 + + 0 + + + + dolb_tcp_Bps + + 0 + + U + + 1 + + 600 + + 0 + + + + dolb_udp_Bps + + 0 + + U + + 1 + + 600 + + 0 + + + + dolb_nlbtcp_Bps + + 0 + + U + + 1 + + 600 + + 0 + + + + dolb_nlbudp_Bps + + 0 + + U + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Load Balancers - Health Checks + + + |host_description| - Health Checks + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + dolb_hc_status + + 0 + + U + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Load Balancers - Downtime + + + |host_description| - Downtime + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + dolb_downtime + + 0 + + U + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Load Balancers - Response Time + + + |host_description| - Response Time + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + dolb_resp_avg_s + + 0 + + U + + 1 + + 600 + + 0 + + + + dolb_resp_p95_s + + 0 + + U + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Load Balancers - Droplet Connections + + + |host_description| - Droplet Connections + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + dolb_back_conn + + 0 + + U + + 1 + + 600 + + 0 + + + + dolb_queue + + 0 + + U + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Cloud: DigitalOcean Load Balancers - Collection Age + + + |host_description| - Collection Age + + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + hash_200103d62c52891f4f9688729a5bc9fad91b18 + + 300 + + on + + + + + dolb_age + + 0 + + U + + 1 + + 600 + + 0 + + + + + hash_070103172b4b0eacee4948c6479f587b62e512 + on + + + + hash_07010330fb5d5bcf3d66bb5abe88596f357c26 + on + + + + hash_07010331112c85ae4ff821d3b288336288818c + on + + + + + + Normal + %8.2lf %s + + + Cloud: DigitalOcean Droplets + Cloud: DigitalOcean Droplets of the scope, read from the plugin cache. + <path_cacti>/resource/script_server/cloud_do_droplet.xml + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + + hash_0001033c320e02f1fa483a4d3411b6f44b9441 + CPU + + + do_cpu_pct + hash_010103f66b0fa84e570fb1b7f91095a75b4b75 + hash_0801034386c404e78b9a77be5346a8dd3019b1 + + + + + title + 1 + |host_description| - |query_resourceName| - CPU + + + + + name + hash_010103f66b0fa84e570fb1b7f91095a75b4b75 + 1 + |host_description| - |query_resourceName| - CPU + + + + + hash_000103ff48ecb36a954a915b295d9a6231a0f7 + Bandwidth + + + do_bw_pub_in + hash_0101030521a24d9a8dbc1348450aada426e5f4 + hash_08010315815af0359dda45dd27be828b7f888c + + + do_bw_pub_out + hash_0101030521a24d9a8dbc1348450aada426e5f4 + hash_080103b4012a74aa9256874cce00f892db8d2e + + + do_bw_prv_in + hash_0101030521a24d9a8dbc1348450aada426e5f4 + hash_080103438da5042072e6fde5889555b6358eec + + + do_bw_prv_out + hash_0101030521a24d9a8dbc1348450aada426e5f4 + hash_080103abdf5479f3988a8f52fb0071b6b0940a + + + + + title + 1 + |host_description| - |query_resourceName| - Bandwidth + + + + + name + hash_0101030521a24d9a8dbc1348450aada426e5f4 + 1 + |host_description| - |query_resourceName| - Bandwidth + + + + + hash_000103e394d7744e5c7aeb540ca545af244e08 + Load Average + + + do_load_1 + hash_010103c9a451c6de97e773ee6f0e332b75dccf + hash_080103db82538a096d38ff3cb779b61835fa67 + + + do_load_5 + hash_010103c9a451c6de97e773ee6f0e332b75dccf + hash_080103bf75b68252e387259dd57016b0edafa9 + + + do_load_15 + hash_010103c9a451c6de97e773ee6f0e332b75dccf + hash_0801037c44f770c69bb104a0881d60f8716cf7 + + + + + title + 1 + |host_description| - |query_resourceName| - Load Average + + + + + name + hash_010103c9a451c6de97e773ee6f0e332b75dccf + 1 + |host_description| - |query_resourceName| - Load Average + + + + + hash_000103e14038609a7c60402c99e4d0069bbf52 + Memory + + + do_mem_total + hash_010103eb5db0057ebedca97ca275ca6eefd633 + hash_080103071c9470d231ba7e986ce4eb3af669ba + + + do_mem_avail + hash_010103eb5db0057ebedca97ca275ca6eefd633 + hash_080103c256012a2342382020f35099cbbdec0d + + + do_mem_free + hash_010103eb5db0057ebedca97ca275ca6eefd633 + hash_08010310348b5e0f6d7dfc97406fa97b041a47 + + + do_mem_cached + hash_010103eb5db0057ebedca97ca275ca6eefd633 + hash_080103baab536c8205e475beaa2e152bbd7ad3 + + + + + title + 1 + |host_description| - |query_resourceName| - Memory + + + + + name + hash_010103eb5db0057ebedca97ca275ca6eefd633 + 1 + |host_description| - |query_resourceName| - Memory + + + + + hash_000103fa43a6253b3f766b23f7c0df2f66135c + Collection Age + + + do_age + hash_0101037293273586ac5d132074656f5e14b2f4 + hash_080103ec1614dd14f68e78b8fa6a83107cf301 + + + + + title + 1 + |host_description| - |query_resourceName| - Collection Age + + + + + name + hash_0101037293273586ac5d132074656f5e14b2f4 + 1 + |host_description| - |query_resourceName| - Collection Age + + + + + + + Cloud: DigitalOcean Load Balancers + Cloud: DigitalOcean Load Balancers of the scope, read from the plugin cache. + <path_cacti>/resource/script_server/cloud_do_load_balancer.xml + hash_030103332111d8b54ac8ce939af87a7eac0c06 + + + hash_0001039375e6a0ad69fdc73f619ef506cb7139 + Connections + + + dolb_conn_cur + hash_0101035cca4c71f4a59c9eb4569b58cd444fdd + hash_080103af0dc885a37f1885baa3746e2efbaf94 + + + dolb_conn_lim + hash_0101035cca4c71f4a59c9eb4569b58cd444fdd + hash_08010328c03a47b34e3032f3c956549d6c608b + + + + + title + 1 + |host_description| - |query_resourceName| - Connections + + + + + name + hash_0101035cca4c71f4a59c9eb4569b58cd444fdd + 1 + |host_description| - |query_resourceName| - Connections + + + + + hash_000103fab3cae3a96221708d61fa359cf05921 + CPU + + + dolb_cpu_pct + hash_010103ce06abcd9fa6a7ebf63f383f2d8edbd9 + hash_080103b4bfa3d1771c2f5f6a521a49682f594f + + + + + title + 1 + |host_description| - |query_resourceName| - CPU + + + + + name + hash_010103ce06abcd9fa6a7ebf63f383f2d8edbd9 + 1 + |host_description| - |query_resourceName| - CPU + + + + + hash_0001032e56476c6f6acdcec6ac9ca457fd199c + HTTP Requests + + + dolb_http_rps + hash_01010306081918ccdd555e880bc1207ead22ad + hash_0801033554656861fc21f55f146b2fda7fb4c5 + + + + + title + 1 + |host_description| - |query_resourceName| - HTTP Requests + + + + + name + hash_01010306081918ccdd555e880bc1207ead22ad + 1 + |host_description| - |query_resourceName| - HTTP Requests + + + + + hash_000103117fbc0ed1725f67af0955be2d77023c + HTTP Responses + + + dolb_http_resp + hash_0101032cbedc3e9320e6d8701f8e1785187cb6 + hash_080103c837c84916127062033147fb69d430c1 + + + + + title + 1 + |host_description| - |query_resourceName| - HTTP Responses + + + + + name + hash_0101032cbedc3e9320e6d8701f8e1785187cb6 + 1 + |host_description| - |query_resourceName| - HTTP Responses + + + + + hash_0001037448d244f9720c5c1e79d6de3fc0d00b + Throughput + + + dolb_http_Bps + hash_010103baa66323f654dd84b9a6d924d6f50517 + hash_08010304d94f156e617662058f507fd17aa8dd + + + dolb_tcp_Bps + hash_010103baa66323f654dd84b9a6d924d6f50517 + hash_080103c0e4a6d447e5be1180d3db907aef281b + + + dolb_udp_Bps + hash_010103baa66323f654dd84b9a6d924d6f50517 + hash_080103e9069fda9165ea96860ecf7b74964722 + + + dolb_nlbtcp_Bps + hash_010103baa66323f654dd84b9a6d924d6f50517 + hash_080103ad694cf8f6cc1a787c33f7ca0aa00fbd + + + dolb_nlbudp_Bps + hash_010103baa66323f654dd84b9a6d924d6f50517 + hash_0801032a7fb385707dffed06f4fb4301d3cc3f + + + + + title + 1 + |host_description| - |query_resourceName| - Throughput + + + + + name + hash_010103baa66323f654dd84b9a6d924d6f50517 + 1 + |host_description| - |query_resourceName| - Throughput + + + + + hash_000103625f54b70163fddc1bd0da93087bedef + Health Checks + + + dolb_hc_status + hash_01010354c9dc192706be516fb8e9ef5e754cc0 + hash_0801039dc83d3d932784e727329d5b2a2657fe + + + + + title + 1 + |host_description| - |query_resourceName| - Health Checks + + + + + name + hash_01010354c9dc192706be516fb8e9ef5e754cc0 + 1 + |host_description| - |query_resourceName| - Health Checks + + + + + hash_00010325662a207edf1776a52a9f0deca2bad3 + Downtime + + + dolb_downtime + hash_010103abb42eea8f065fc7e6901ef94c74a677 + hash_080103c34f29ccdb91f4bf8080b9b1175eccd0 + + + + + title + 1 + |host_description| - |query_resourceName| - Downtime + + + + + name + hash_010103abb42eea8f065fc7e6901ef94c74a677 + 1 + |host_description| - |query_resourceName| - Downtime + + + + + hash_0001030271019d9650f4e9f18070044724b119 + Response Time + + + dolb_resp_avg_s + hash_0101038dbb1c7237736971c0f86ea5a4602b27 + hash_0801033e6006ed0f73462fd0257fabe92ecf4f + + + dolb_resp_p95_s + hash_0101038dbb1c7237736971c0f86ea5a4602b27 + hash_080103c0070b529ad5d8cf9e2f7fe632642f59 + + + + + title + 1 + |host_description| - |query_resourceName| - Response Time + + + + + name + hash_0101038dbb1c7237736971c0f86ea5a4602b27 + 1 + |host_description| - |query_resourceName| - Response Time + + + + + hash_0001036d050a9d8044862b803530a684f83503 + Droplet Connections + + + dolb_back_conn + hash_0101039f4959feddd4ff57cde4bd44d1e2f0e2 + hash_0801038341453059c4388c97b6d2974d80505f + + + dolb_queue + hash_0101039f4959feddd4ff57cde4bd44d1e2f0e2 + hash_0801037db2d786f1323bbd4406f93c3f16b39a + + + + + title + 1 + |host_description| - |query_resourceName| - Droplet Connections + + + + + name + hash_0101039f4959feddd4ff57cde4bd44d1e2f0e2 + 1 + |host_description| - |query_resourceName| - Droplet Connections + + + + + hash_0001033a1a600f25b30248b90559a3df51179b + Collection Age + + + dolb_age + hash_0101030800159906f92b6765016dca68baa916 + hash_080103324e22df4d579128205db3058caa02e9 + + + + + title + 1 + |host_description| - |query_resourceName| - Collection Age + + + + + name + hash_0101030800159906f92b6765016dca68baa916 + 1 + |host_description| - |query_resourceName| - Collection Age + + + + + + diff --git a/templates/resource/cloud_do_droplet.xml b/templates/resource/cloud_do_droplet.xml new file mode 100644 index 0000000..f5de7b9 --- /dev/null +++ b/templates/resource/cloud_do_droplet.xml @@ -0,0 +1,92 @@ + + Get Cloud: DigitalOcean Droplets + |path_cacti|/plugins/cloud/ss_cloud.php + ss_cloud + php + |host_id| droplet + index + query + get + num_indexes + ! + resourceId + alphabetic + |chosen_order_field| + + + Resource ID + input + resourceId + + + Resource Name + input + resourceName + + + CPU: do_cpu_pct + output + do_cpu_pct + + + Bandwidth: do_bw_pub_in + output + do_bw_pub_in + + + Bandwidth: do_bw_pub_out + output + do_bw_pub_out + + + Bandwidth: do_bw_prv_in + output + do_bw_prv_in + + + Bandwidth: do_bw_prv_out + output + do_bw_prv_out + + + Load Average: do_load_1 + output + do_load_1 + + + Load Average: do_load_5 + output + do_load_5 + + + Load Average: do_load_15 + output + do_load_15 + + + Memory: do_mem_total + output + do_mem_total + + + Memory: do_mem_avail + output + do_mem_avail + + + Memory: do_mem_free + output + do_mem_free + + + Memory: do_mem_cached + output + do_mem_cached + + + Collection Age: do_age + output + do_age + + + diff --git a/templates/resource/cloud_do_load_balancer.xml b/templates/resource/cloud_do_load_balancer.xml new file mode 100644 index 0000000..1faf5ec --- /dev/null +++ b/templates/resource/cloud_do_load_balancer.xml @@ -0,0 +1,112 @@ + + Get Cloud: DigitalOcean Load Balancers + |path_cacti|/plugins/cloud/ss_cloud.php + ss_cloud + php + |host_id| load_balancer + index + query + get + num_indexes + ! + resourceId + alphabetic + |chosen_order_field| + + + Resource ID + input + resourceId + + + Resource Name + input + resourceName + + + Connections: dolb_conn_cur + output + dolb_conn_cur + + + Connections: dolb_conn_lim + output + dolb_conn_lim + + + CPU: dolb_cpu_pct + output + dolb_cpu_pct + + + HTTP Requests: dolb_http_rps + output + dolb_http_rps + + + HTTP Responses: dolb_http_resp + output + dolb_http_resp + + + Throughput: dolb_http_Bps + output + dolb_http_Bps + + + Throughput: dolb_tcp_Bps + output + dolb_tcp_Bps + + + Throughput: dolb_udp_Bps + output + dolb_udp_Bps + + + Throughput: dolb_nlbtcp_Bps + output + dolb_nlbtcp_Bps + + + Throughput: dolb_nlbudp_Bps + output + dolb_nlbudp_Bps + + + Health Checks: dolb_hc_status + output + dolb_hc_status + + + Downtime: dolb_downtime + output + dolb_downtime + + + Response Time: dolb_resp_avg_s + output + dolb_resp_avg_s + + + Response Time: dolb_resp_p95_s + output + dolb_resp_p95_s + + + Droplet Connections: dolb_back_conn + output + dolb_back_conn + + + Droplet Connections: dolb_queue + output + dolb_queue + + + Collection Age: dolb_age + output + dolb_age + + + diff --git a/tests/Integration/TemplatesTest.php b/tests/Integration/TemplatesTest.php new file mode 100644 index 0000000..02e517d --- /dev/null +++ b/tests/Integration/TemplatesTest.php @@ -0,0 +1,85 @@ + + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This file is part of plugin_cloud, a plugin for Cacti. + * https://github.com/somethingwithproof/plugin_cloud + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + + +/* + * The shipped templates against a real Cacti (REQ-OBJ-002, #42). Template + * objects live in Cacti's tables, so they survive the lifecycle reset; each + * test states what it expects regardless of what an earlier one imported. + */ + +beforeEach(function () { + lifecycle('reset'); +}); + +afterAll(function () { + lifecycle('reset'); +}); + +it('imports every template on install and copies the data query definitions', function () { + $state = lifecycle('install'); + + expect($state['templates_sha'])->toBe(hash_file('sha256', dirname(__DIR__, 2) . '/templates/cloud_digitalocean.xml')) + ->and($state['resource_files'])->toBe(['cloud_do_droplet.xml', 'cloud_do_load_balancer.xml']) + ->and($state['template_names'])->toHaveCount(15) + ->and($state['template_names'])->toContain('Cloud: DigitalOcean Droplets - CPU') + ->and($state['template_names'])->toContain('Cloud: DigitalOcean Load Balancers - Collection Age'); +}); + +it('re-imports without adding a single template row', function () { + $first = lifecycle('install'); + + // The reset forgets the recorded checksum, so this install imports again. + lifecycle('reset'); + $second = lifecycle('install'); + + expect($second['templates_sha'])->toBe($first['templates_sha']) + ->and($second['template_rows'])->toBe($first['template_rows']); +}); + +it('skips the import when the package is unchanged and every object is present', function () { + $installed = lifecycle('install'); + $again = lifecycle('templates'); + + expect($again['result'])->toBeTrue() + ->and($again['template_rows'])->toBe($installed['template_rows']); +}); + +it('restores a shipped graph template an administrator deleted', function () { + $installed = lifecycle('install'); + + $deleted = lifecycle('delete_graph_template', 'do_cpu'); + expect($deleted['template_names'])->not->toContain('Cloud: DigitalOcean Droplets - CPU'); + + $restored = lifecycle('templates'); + expect($restored['result'])->toBeTrue() + ->and($restored['template_names'])->toContain('Cloud: DigitalOcean Droplets - CPU') + ->and($restored['template_rows'])->toBe($installed['template_rows']); +}); + +it('imports a changed package on the next upgrade check', function () { + lifecycle('install'); + lifecycle('set_setting', 'cloud_templates_sha256=stale'); + + $upgraded = lifecycle('upgrade'); + + expect($upgraded['result'])->toBeTrue() + ->and($upgraded['templates_sha']) + ->toBe(hash_file('sha256', dirname(__DIR__, 2) . '/templates/cloud_digitalocean.xml')); +}); diff --git a/tests/Unit/TemplateInstallTest.php b/tests/Unit/TemplateInstallTest.php new file mode 100644 index 0000000..041f103 --- /dev/null +++ b/tests/Unit/TemplateInstallTest.php @@ -0,0 +1,198 @@ + + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This file is part of plugin_cloud, a plugin for Cacti. + * https://github.com/somethingwithproof/plugin_cloud + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + + +use Somethingwithproof\Cloud\TemplateRepository; +use Somethingwithproof\Cloud\Templates; + +/* + * Templates' decisions against the database stubs: when it imports, what it + * records, and that it never records a package it could not fully import. + * The import itself runs against a real Cacti in tests/Integration. + */ + +function cloud_tpl_test_dir(): string { + $dir = sys_get_temp_dir() . '/cloud-templates-' . bin2hex(random_bytes(6)); + mkdir($dir . '/source/resource', 0700, true); + mkdir($dir . '/resource', 0700); + file_put_contents($dir . '/source/' . Templates::PACKAGE, ''); + file_put_contents($dir . '/source/resource/cloud_do_droplet.xml', ''); + + return $dir; +} + +/** + * @return array{0: Templates, 1: \ArrayObject} + */ +function cloud_tpl_installer(string $dir, bool $imports = true, ?string $resource = null): array { + $calls = new \ArrayObject(); + + return [ + new Templates( + new TemplateRepository(false), + $dir . '/source', + $resource ?? $dir . '/resource', + function (string $xml, int $profile) use ($calls, $imports): bool { + $calls[] = [$xml, $profile]; + + return $imports; + } + ), + $calls, + ]; +} + +/** + * @return list every object hash, as the lookup returns them + */ +function cloud_tpl_all_present(): array { + $rows = []; + + foreach (TemplateRepository::objects() as $keys) { + foreach ($keys as $key) { + $rows[] = ['hash' => TemplateRepository::hash($key)]; + } + } + + return $rows; +} + +function cloud_tpl_recorded(): array { + return array_values(array_filter( + $GLOBALS['__cloud_db_exec'], + fn (array $s): bool => str_contains($s['sql'], 'REPLACE INTO settings') + )); +} + +beforeEach(function () { + $GLOBALS['__cloud_db_exec'] = []; + $GLOBALS['__cloud_log'] = []; + $GLOBALS['__cloud_db_rows'] = [ + 'GET_LOCK' => [['1']], + 'data_source_profiles' => [['1']], + ]; +}); + +it('imports a new package with the default profile and records its checksum', function () { + $dir = cloud_tpl_test_dir(); + [$templates, $calls] = cloud_tpl_installer($dir); + + $GLOBALS['__cloud_db_rows']['SELECT hash FROM'] = cloud_tpl_all_present(); + + expect($templates->install())->toBeTrue() + ->and($calls->getArrayCopy())->toBe([['', 1]]) + ->and(cloud_tpl_recorded()[0]['params'])->toBe(['cloud_templates_sha256', hash('sha256', '')]) + ->and(file_get_contents($dir . '/resource/cloud_do_droplet.xml'))->toBe('') + ->and(fileperms($dir . '/resource/cloud_do_droplet.xml') & 0777)->toBe(0644) + ->and(glob($dir . '/resource/.*.xml.*'))->toBe([]); +}); + +it('skips the import when the recorded checksum matches and every object is present', function () { + $dir = cloud_tpl_test_dir(); + [$templates, $calls] = cloud_tpl_installer($dir); + + $GLOBALS['__cloud_db_rows']['SELECT value FROM settings'] = [[hash('sha256', '')]]; + $GLOBALS['__cloud_db_rows']['SELECT hash FROM'] = cloud_tpl_all_present(); + + expect($templates->install())->toBeTrue() + ->and($templates->isCurrent())->toBeTrue() + ->and(count($calls))->toBe(0) + ->and(cloud_tpl_recorded())->toBe([]); +}); + +it('imports again when the checksum matches but an object was deleted', function () { + $dir = cloud_tpl_test_dir(); + [$templates, $calls] = cloud_tpl_installer($dir); + $present = cloud_tpl_all_present(); + array_shift($present); + + $GLOBALS['__cloud_db_rows']['SELECT value FROM settings'] = [[hash('sha256', '')]]; + $GLOBALS['__cloud_db_rows']['SELECT hash FROM'] = $present; + + // The stub answers every lookup the same way, so the object stays missing + // after the import too, and nothing is recorded. + expect($templates->install())->toBeFalse() + ->and(count($calls))->toBe(1) + ->and(cloud_tpl_recorded())->toBe([]); +}); + +it('records nothing when the importer reports an error', function () { + [$templates, $calls] = cloud_tpl_installer(cloud_tpl_test_dir(), false); + + $GLOBALS['__cloud_db_rows']['SELECT hash FROM'] = cloud_tpl_all_present(); + + expect($templates->install())->toBeFalse() + ->and(count($calls))->toBe(1) + ->and(cloud_tpl_recorded())->toBe([]); +}); + +it('does not import without a default data source profile', function () { + [$templates, $calls] = cloud_tpl_installer(cloud_tpl_test_dir()); + + $GLOBALS['__cloud_db_rows']['data_source_profiles'] = []; + + expect($templates->install())->toBeFalse() + ->and(count($calls))->toBe(0); +}); + +it('defers to a process holding the lock and leaves the files alone', function () { + $dir = cloud_tpl_test_dir(); + [$templates, $calls] = cloud_tpl_installer($dir); + + $GLOBALS['__cloud_db_rows']['GET_LOCK'] = [['0']]; + + expect($templates->install())->toBeFalse() + ->and(count($calls))->toBe(0) + ->and(file_exists($dir . '/resource/cloud_do_droplet.xml'))->toBeFalse() + ->and(array_column($GLOBALS['__cloud_log'], 'message')) + ->toContain('WARNING: Template import deferred: another process holds the template lock'); +}); + +it('releases the lock after an import, whatever its outcome', function () { + foreach ([true, false] as $imports) { + $GLOBALS['__cloud_db_exec'] = []; + [$templates] = cloud_tpl_installer(cloud_tpl_test_dir(), $imports); + + $templates->install(); + + expect(array_column($GLOBALS['__cloud_db_exec'], 'sql'))->toContain('DO RELEASE_LOCK(?)'); + } +}); + +it('refuses when the Cacti resource directory is missing', function () { + $dir = cloud_tpl_test_dir(); + [$templates, $calls] = cloud_tpl_installer($dir, true, $dir . '/no-such-dir'); + + expect($templates->install())->toBeFalse() + ->and(count($calls))->toBe(0); +}); + +it('replaces a link at the target instead of writing through it', function () { + $dir = cloud_tpl_test_dir(); + [$templates] = cloud_tpl_installer($dir); + file_put_contents($dir . '/elsewhere.xml', 'kept'); + symlink($dir . '/elsewhere.xml', $dir . '/resource/cloud_do_droplet.xml'); + + $GLOBALS['__cloud_db_rows']['SELECT hash FROM'] = cloud_tpl_all_present(); + $templates->install(); + + expect(is_link($dir . '/resource/cloud_do_droplet.xml'))->toBeFalse() + ->and(file_get_contents($dir . '/resource/cloud_do_droplet.xml'))->toBe('') + ->and(file_get_contents($dir . '/elsewhere.xml'))->toBe('kept'); +}); diff --git a/tests/Unit/TemplatesTest.php b/tests/Unit/TemplatesTest.php new file mode 100644 index 0000000..548777a --- /dev/null +++ b/tests/Unit/TemplatesTest.php @@ -0,0 +1,121 @@ + + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This file is part of plugin_cloud, a plugin for Cacti. + * https://github.com/somethingwithproof/plugin_cloud + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + + +use Somethingwithproof\Cloud\DigitalOceanCatalog; +use Somethingwithproof\Cloud\TemplateRepository; + +require_once dirname(__DIR__) . '/bin/generate-templates.php'; + +/* + * The shipped template XML against the catalog it is generated from + * (REQ-OBJ-001, REQ-OBJ-003). Regenerate with: + * php tests/bin/generate-templates.php templates + */ + +it('ships exactly the templates the catalog generates', function () { + $root = dirname(__DIR__, 2) . '/templates/'; + + foreach (cloud_tpl_files() as $name => $contents) { + expect(file_get_contents($root . $name))->toBe($contents, $name . ' is out of date; regenerate it'); + } + + $shipped = array_map( + fn (string $path): string => substr($path, strlen($root)), + array_merge(glob($root . '*.xml') ?: [], glob($root . 'resource/*.xml') ?: []) + ); + sort($shipped); + $generated = array_keys(cloud_tpl_files()); + sort($generated); + + expect($shipped)->toBe($generated); +}); + +it('places every catalog metric and age in exactly one graph of its resource type', function () { + $placed = []; + + foreach (cloud_tpl_graphs() as $graph) { + $placed = array_merge($placed, $graph[4]); + } + + $expected = array_merge(DigitalOceanCatalog::names(), array_values(DigitalOceanCatalog::AGE)); + sort($placed); + sort($expected); + + expect($placed)->toBe($expected); +}); + +it('gives every object the package defines the hash the repository looks up', function () { + $xml = cloud_tpl_package(); + + foreach (TemplateRepository::objects() as $keys) { + foreach ($keys as $key) { + expect(str_contains($xml, '0103' . TemplateRepository::hash($key) . '>'))->toBeTrue($key); + } + } +}); + +it('generates well-formed XML with no object hash defined twice', function () { + foreach (cloud_tpl_files() as $name => $contents) { + expect(simplexml_load_string($contents))->not->toBeFalse($name); + } + + preg_match_all('/^\t+<(hash_\d{6}[0-9a-f]{32})>$/m', cloud_tpl_package(), $defined); + + expect(count($defined[1]))->toBe(count(array_unique($defined[1]))); +}); + +it('maps each data query output field to a data source its graphs use', function () { + foreach ([DigitalOceanCatalog::DROPLET, DigitalOceanCatalog::LOAD_BALANCER] as $type) { + $resource = simplexml_load_string(cloud_tpl_resource($type)); + $outputs = []; + + foreach ($resource->fields->children() as $name => $field) { + if ((string) $field->direction === 'output') { + $outputs[] = $name; + } + } + + $expected = []; + + foreach (DigitalOceanCatalog::GRAPHS as $graph) { + if ($graph[0] === $type) { + $expected = array_merge($expected, $graph[4]); + } + } + + expect($outputs)->toBe($expected) + ->and((string) $resource->arg_prepend)->toBe('|host_id| ' . $type); + } +}); + +it('collects only a graph\'s own metrics, through one data template per graph', function () { + $package = simplexml_load_string(cloud_tpl_package()); + + foreach (DigitalOceanCatalog::GRAPHS as $key => $graph) { + $template = $package->{cloud_tpl_own('data_template', 'data_template/' . $key)}; + $names = []; + + foreach ($template->items->children() as $item) { + $names[] = (string) $item->data_source_name; + } + + expect($names)->toBe($graph[4], $key); + } +}); diff --git a/tests/bin/generate-templates.php b/tests/bin/generate-templates.php new file mode 100644 index 0000000..0e6befe --- /dev/null +++ b/tests/bin/generate-templates.php @@ -0,0 +1,526 @@ + + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This file is part of plugin_cloud, a plugin for Cacti. + * https://github.com/somethingwithproof/plugin_cloud + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +/* + * Writes the shipped Cacti templates from the DigitalOcean metric catalog: + * + * php tests/bin/generate-templates.php + * + * /cloud_digitalocean.xml is the package: one device template per + * provider scope, a script server data query per resource type, and a data + * template and graph template per catalog graph (ADR 0010). Each + * /resource/*.xml is the data query definition, which the plugin + * copies into /resource/script_server at import. + * + * The layout follows Cacti's own export (lib/export.php), field for field, + * so the importer reads it as it reads any shipped package. Output is + * reproducible: every hash is md5('plugin_cloud/' . key) over a fixed key. + * The template unit test runs these functions and compares their output + * with the shipped files. + * + * Kept parseable by PHP 8.0, like the other scripts here. + */ + +require_once dirname(__DIR__, 2) . '/include/autoload.php'; + +use Somethingwithproof\Cloud\DigitalOceanCatalog; + +/* include/global_arrays.php in 1.2.31 and 1.2.x. */ +const CLOUD_TPL_VERSION = '0103'; + +const CLOUD_TPL_TYPES = array( + 'graph_template' => '00', + 'data_template' => '01', + 'host_template' => '02', + 'data_input_method' => '03', + 'data_query' => '04', + 'gprint_preset' => '06', + 'data_input_field' => '07', + 'data_template_item' => '08', + 'graph_template_input' => '09', + 'graph_template_item' => '10', + 'data_query_graph' => '11', + 'data_query_sv_graph' => '12', + 'data_query_sv_data_source' => '13', + 'data_source_profile' => '20', +); + +/* Stock objects from cacti.sql: "Get Script Server Data (Indexed)" with its + * index_type, index_value and output_type fields, "5 Minute Collection", + * and the "Normal" GPRINT preset. */ +const CLOUD_TPL_SCRIPT_SERVER_INDEXED = '332111d8b54ac8ce939af87a7eac0c06'; +const CLOUD_TPL_INDEX_FIELDS = array( + '172b4b0eacee4948c6479f587b62e512', + '30fb5d5bcf3d66bb5abe88596f357c26', + '31112c85ae4ff821d3b288336288818c', +); +const CLOUD_TPL_PROFILE_5MIN = 'd62c52891f4f9688729a5bc9fad91b18'; +const CLOUD_TPL_GPRINT_NORMAL = 'e9c43831e54eca8069317a2ce8c6f751'; + +/* data_source_types, graph_item_types and consolidation_functions. */ +const CLOUD_TPL_DS_GAUGE = '1'; +const CLOUD_TPL_ITEM_LINE1 = '4'; +const CLOUD_TPL_ITEM_GPRINT = '9'; +const CLOUD_TPL_CF_AVERAGE = '1'; +const CLOUD_TPL_CF_MAX = '3'; +const CLOUD_TPL_CF_LAST = '4'; + +/* Stock entries of the colors table, in the order a graph's lines use them. */ +const CLOUD_TPL_COLORS = array('4668E4', '00CF00', 'EA8F00', 'F51D30', '8D00BA'); + +/* Per resource type: data query name, resource file, and the script + * server's type argument. */ +const CLOUD_TPL_QUERIES = array( + DigitalOceanCatalog::DROPLET => array('Cloud: DigitalOcean Droplets', 'cloud_do_droplet.xml', 'Droplet'), + DigitalOceanCatalog::LOAD_BALANCER => array( + 'Cloud: DigitalOcean Load Balancers', + 'cloud_do_load_balancer.xml', + 'Load Balancer', + ), +); + +/** + * The XML element name or reference for one object, as get_hash_version() + * builds it. + */ +function cloud_tpl_ref(string $type, string $md5): string { + return 'hash_' . CLOUD_TPL_TYPES[$type] . CLOUD_TPL_VERSION . $md5; +} + +function cloud_tpl_own(string $type, string $key): string { + return cloud_tpl_ref($type, md5('plugin_cloud/' . $key)); +} + +/** + * Renders nested arrays as Cacti's exporter does: one element per line, + * tab indents, values escaped like xml_character_encode(). + * + * @param array $nodes + */ +function cloud_tpl_render(array $nodes, int $depth): string { + $text = ''; + $indent = str_repeat("\t", $depth); + + foreach ($nodes as $name => $value) { + if (is_array($value)) { + $text .= $indent . '<' . $name . ">\n" . cloud_tpl_render($value, $depth + 1) . $indent . '\n"; + } else { + $text .= $indent . '<' . $name . '>' . htmlspecialchars((string) $value, ENT_QUOTES | ENT_XML1, 'UTF-8') + . '\n"; + } + } + + return $text; +} + +/** + * The catalog graphs, after checking that every metric and age name is in + * exactly one graph of its own resource type. + * + * @return array}> + */ +function cloud_tpl_graphs(): array { + $graphs = DigitalOceanCatalog::GRAPHS; + $placed = array(); + + foreach ($graphs as $key => $graph) { + foreach ($graph[4] as $ds) { + $metric = DigitalOceanCatalog::metric($ds); + $type = $metric === null ? array_search($ds, DigitalOceanCatalog::AGE, true) : $metric['type']; + + if ($type !== $graph[0]) { + throw new RuntimeException($ds . ' in graph ' . $key . ' is not a ' . $graph[0] . ' metric'); + } + + if (isset($placed[$ds])) { + throw new RuntimeException($ds . ' is in more than one graph'); + } + + if (count($graph[4]) > count(CLOUD_TPL_COLORS)) { + throw new RuntimeException('graph ' . $key . ' has more lines than colors'); + } + + $placed[$ds] = true; + } + } + + $names = array_merge(DigitalOceanCatalog::names(), array_values(DigitalOceanCatalog::AGE)); + $found = array_keys($placed); + + sort($names); + sort($found); + + if ($names !== $found) { + throw new RuntimeException('every catalog metric and age must appear in a graph'); + } + + return $graphs; +} + +/** + * @param array{0: string, 1: string, 2: string, 3: int|null, 4: list} $graph + * @return array + */ +function cloud_tpl_data_template(string $key, array $graph): array { + $items = array(); + + foreach ($graph[4] as $ds) { + $items[cloud_tpl_own('data_template_item', 'data_template_item/' . $ds)] = array( + 't_data_source_name' => '', + 'data_source_name' => $ds, + 't_rrd_minimum' => '', + 'rrd_minimum' => '0', + 't_rrd_maximum' => '', + 'rrd_maximum' => $graph[3] === null ? 'U' : (string) $graph[3], + 't_data_source_type_id' => '', + 'data_source_type_id' => CLOUD_TPL_DS_GAUGE, + 't_rrd_heartbeat' => '', + 'rrd_heartbeat' => '600', + 't_data_input_field_id' => '', + 'data_input_field_id' => '0', + ); + } + + $data = array(); + + foreach (CLOUD_TPL_INDEX_FIELDS as $i => $field) { + $data[sprintf('item_%03d', $i)] = array( + 'data_input_field_id' => cloud_tpl_ref('data_input_field', $field), + 't_value' => 'on', + 'value' => '', + ); + } + + return array( + 'name' => CLOUD_TPL_QUERIES[$graph[0]][0] . ' - ' . $graph[1], + 'ds' => array( + 't_name' => '', + 'name' => '|host_description| - ' . $graph[1], + 'data_source_path' => '', + 'data_input_id' => cloud_tpl_ref('data_input_method', CLOUD_TPL_SCRIPT_SERVER_INDEXED), + 't_data_source_profile_id' => '', + 'data_source_profile_id' => cloud_tpl_ref('data_source_profile', CLOUD_TPL_PROFILE_5MIN), + 't_rrd_step' => '', + 'rrd_step' => '300', + 't_active' => '', + 'active' => 'on', + ), + 'items' => $items, + 'data' => $data, + ); +} + +/** + * @param array $overrides + * @return array + */ +function cloud_tpl_graph_fields(string $title, string $label, array $overrides): array { + $values = array_merge(array( + 'title' => $title, + 'vertical_label' => $label, + 'image_format_id' => '3', + 'height' => '200', + 'width' => '700', + 'base_value' => '1000', + 'slope_mode' => 'on', + 'auto_scale' => 'on', + 'auto_scale_opts' => '2', + 'auto_scale_log' => '', + 'scale_log_units' => '', + 'auto_scale_rigid' => '', + 'upper_limit' => '100', + 'lower_limit' => '0', + 'unit_value' => '', + 'unit_exponent_value' => '', + 'unit_length' => '', + 'no_gridfit' => '', + 'alt_y_grid' => '', + 'right_axis' => '', + 'right_axis_label' => '', + 'right_axis_format' => '0', + 'right_axis_formatter' => '0', + 'left_axis_formatter' => '0', + 'auto_padding' => 'on', + 'dynamic_labels' => '', + 'force_rules_legend' => '', + 'tab_width' => '40', + 'legend_position' => '0', + 'legend_direction' => '0', + ), $overrides); + + $fields = array(); + + foreach ($values as $name => $value) { + $fields['t_' . $name] = ''; + $fields[$name] = $value; + } + + return $fields; +} + +/** + * @param array{0: string, 1: string, 2: string, 3: string, 4: bool} $row + * graph item type, color, consolidation function, text, line break + * @return array + */ +function cloud_tpl_graph_item(string $task, array $row, int $sequence): array { + return array( + 'graph_type_id' => $row[0], + 'task_item_id' => $task, + 'color_id' => $row[1], + 'alpha' => 'FF', + 'consolidation_function_id' => $row[2], + 'cdef_id' => '0', + 'vdef_id' => '0', + 'shift' => '', + 'value' => '', + 'gprint_id' => cloud_tpl_ref('gprint_preset', CLOUD_TPL_GPRINT_NORMAL), + 'textalign' => '', + 'text_format' => $row[3], + 'hard_return' => $row[4] ? 'on' : '', + 'line_width' => $row[0] === CLOUD_TPL_ITEM_LINE1 ? '1.00' : '0.00', + 'dashes' => '', + 'dash_offset' => '0', + 'sequence' => (string) $sequence, + ); +} + +function cloud_tpl_title(array $graph): string { + return '|host_description| - |query_resourceName| - ' . $graph[1]; +} + +/** + * @param array{0: string, 1: string, 2: string, 3: int|null, 4: list} $graph + * @return array + */ +function cloud_tpl_graph_template(string $key, array $graph): array { + $items = array(); + $inputs = array(); + $sequence = 0; + + foreach ($graph[4] as $i => $ds) { + $task = cloud_tpl_own('data_template_item', 'data_template_item/' . $ds); + $rows = array( + array(CLOUD_TPL_ITEM_LINE1, CLOUD_TPL_COLORS[$i], CLOUD_TPL_CF_AVERAGE, $ds, false), + array(CLOUD_TPL_ITEM_GPRINT, '0', CLOUD_TPL_CF_LAST, 'Cur:', false), + array(CLOUD_TPL_ITEM_GPRINT, '0', CLOUD_TPL_CF_AVERAGE, 'Avg:', false), + array(CLOUD_TPL_ITEM_GPRINT, '0', CLOUD_TPL_CF_MAX, 'Max:', true), + ); + $used = array(); + + foreach ($rows as $row) { + $sequence++; + + $item = 'graph_template_item/' . $key . '/' . $sequence; + + $items[cloud_tpl_own('graph_template_item', $item)] = cloud_tpl_graph_item($task, $row, $sequence); + + /* The exporter writes input items with the graph template type + * code, and the importer reads only the md5, so an export of the + * imported template matches this file. */ + $used[] = cloud_tpl_own('graph_template', $item); + } + + $inputs[cloud_tpl_own('graph_template_input', 'graph_template_input/' . $key . '/' . $ds)] = array( + 'name' => 'Data Source [' . $ds . ']', + 'description' => '', + 'column_name' => 'task_item_id', + 'items' => implode('|', $used), + ); + } + + $overrides = $graph[3] === null + ? array('upper_limit' => '100') + : array('auto_scale' => '', 'auto_scale_rigid' => 'on', 'upper_limit' => (string) $graph[3]); + + return array( + 'name' => CLOUD_TPL_QUERIES[$graph[0]][0] . ' - ' . $graph[1], + 'multiple' => '', + 'test_source' => '', + 'graph' => cloud_tpl_graph_fields(cloud_tpl_title($graph), $graph[2], $overrides), + 'items' => $items, + 'inputs' => $inputs, + ); +} + +/** + * @param array}> $graphs + * @return array + */ +function cloud_tpl_data_query(string $type, array $graphs): array { + $out = array(); + + foreach ($graphs as $key => $graph) { + if ($graph[0] !== $type) { + continue; + } + + $template = cloud_tpl_own('data_template', 'data_template/' . $key); + $rrd = array(); + + foreach ($graph[4] as $i => $ds) { + $rrd[sprintf('item_%03d', $i)] = array( + 'snmp_field_name' => $ds, + 'data_template_id' => $template, + 'data_template_rrd_id' => cloud_tpl_own('data_template_item', 'data_template_item/' . $ds), + ); + } + + $out[cloud_tpl_own('data_query_graph', 'data_query_graph/' . $key)] = array( + 'graph_template_id' => cloud_tpl_own('graph_template', 'graph_template/' . $key), + 'name' => $graph[1], + 'rrd' => $rrd, + 'sv_graph' => array( + cloud_tpl_own('data_query_sv_graph', 'data_query_sv_graph/' . $key . '/title') => array( + 'field_name' => 'title', + 'sequence' => '1', + 'text' => cloud_tpl_title($graph), + ), + ), + 'sv_data_source' => array( + cloud_tpl_own('data_query_sv_data_source', 'data_query_sv_data_source/' . $key . '/name') => array( + 'field_name' => 'name', + 'data_template_id' => $template, + 'sequence' => '1', + 'text' => '|host_description| - |query_resourceName| - ' . $graph[1], + ), + ), + ); + } + + return array( + 'name' => CLOUD_TPL_QUERIES[$type][0], + 'description' => CLOUD_TPL_QUERIES[$type][0] . ' of the scope, read from the plugin cache.', + 'xml_path' => '/resource/script_server/' . CLOUD_TPL_QUERIES[$type][1], + 'data_input_id' => cloud_tpl_ref('data_input_method', CLOUD_TPL_SCRIPT_SERVER_INDEXED), + 'graphs' => $out, + ); +} + +function cloud_tpl_package(): string { + $graphs = cloud_tpl_graphs(); + $queries = array(); + + foreach (array_keys(CLOUD_TPL_QUERIES) as $type) { + $queries[] = cloud_tpl_own('data_query', 'data_query/' . $type); + } + + $objects = array( + cloud_tpl_own('host_template', 'host_template/digitalocean') => array( + 'name' => 'Cloud: DigitalOcean Scope', + 'class' => 'application', + 'graph_templates' => '', + 'data_queries' => implode('|', $queries), + ), + ); + + foreach ($graphs as $key => $graph) { + $objects[cloud_tpl_own('graph_template', 'graph_template/' . $key)] = cloud_tpl_graph_template($key, $graph); + } + + foreach ($graphs as $key => $graph) { + $objects[cloud_tpl_own('data_template', 'data_template/' . $key)] = cloud_tpl_data_template($key, $graph); + } + + /* Packages carry the GPRINT presets they use; an install may have + * deleted "Normal", and the importer would then store 0. */ + $objects[cloud_tpl_ref('gprint_preset', CLOUD_TPL_GPRINT_NORMAL)] = array( + 'name' => 'Normal', + 'gprint_text' => '%8.2lf %s', + ); + + foreach (array_keys(CLOUD_TPL_QUERIES) as $type) { + $objects[cloud_tpl_own('data_query', 'data_query/' . $type)] = cloud_tpl_data_query($type, $graphs); + } + + return cloud_tpl_render(array('cacti' => $objects), 0); +} + +/** + * The data query definition for one resource type, laid out like + * resource/script_server/host_cpu.xml. Field names equal their query_name, + * which is what the script server function receives. + */ +function cloud_tpl_resource(string $type): string { + $fields = array( + 'resourceId' => array('name' => 'Resource ID', 'direction' => 'input', 'query_name' => 'resourceId'), + 'resourceName' => array('name' => 'Resource Name', 'direction' => 'input', 'query_name' => 'resourceName'), + ); + + foreach (DigitalOceanCatalog::GRAPHS as $graph) { + if ($graph[0] !== $type) { + continue; + } + + foreach ($graph[4] as $ds) { + $fields[$ds] = array('name' => $graph[1] . ': ' . $ds, 'direction' => 'output', 'query_name' => $ds); + } + } + + return cloud_tpl_render(array('interface' => array( + 'name' => 'Get ' . CLOUD_TPL_QUERIES[$type][0], + 'script_path' => '|path_cacti|/plugins/cloud/ss_cloud.php', + 'script_function' => 'ss_cloud', + 'script_server' => 'php', + 'arg_prepend' => '|host_id| ' . $type, + 'arg_index' => 'index', + 'arg_query' => 'query', + 'arg_get' => 'get', + 'arg_num_indexes' => 'num_indexes', + 'output_delimiter' => '!', + 'index_order' => 'resourceId', + 'index_order_type' => 'alphabetic', + 'index_title_format' => '|chosen_order_field|', + 'fields' => $fields, + )), 0); +} + +/** + * @return array path relative to the templates directory => contents + */ +function cloud_tpl_files(): array { + $files = array('cloud_digitalocean.xml' => cloud_tpl_package()); + + foreach (CLOUD_TPL_QUERIES as $type => $query) { + $files['resource/' . $query[1]] = cloud_tpl_resource($type); + } + + return $files; +} + +if (PHP_SAPI === 'cli' && isset($argv[0]) && realpath($argv[0]) === __FILE__) { + if (!isset($argv[1]) || $argv[1] === '') { + fwrite(STDERR, "usage: php tests/bin/generate-templates.php \n"); + exit(2); + } + + foreach (cloud_tpl_files() as $name => $contents) { + $path = rtrim($argv[1], '/') . '/' . $name; + + if (!is_dir(dirname($path)) && !mkdir(dirname($path), 0755, true) && !is_dir(dirname($path))) { + fwrite(STDERR, 'cannot create ' . dirname($path) . "\n"); + exit(1); + } + + if (file_put_contents($path, $contents) !== strlen($contents)) { + fwrite(STDERR, 'cannot write ' . $path . "\n"); + exit(1); + } + } +} diff --git a/tests/bin/lifecycle.php b/tests/bin/lifecycle.php index 3dea67f..401343b 100644 --- a/tests/bin/lifecycle.php +++ b/tests/bin/lifecycle.php @@ -110,6 +110,56 @@ list($table, $column) = explode('.', preg_replace('/[^a-z_.]/', '', $argument), 2); db_execute('ALTER TABLE `' . $table . '` DROP COLUMN `' . $column . '`'); + break; + case 'templates': + // Run the template install on its own, as a second upgrade would. + include_once($config['base_path'] . '/plugins/cloud/setup.php'); + cloud_boot(); + $result = cloud_setup_templates(1); + + break; + case 'delete_graph_template': + // What an administrator deleting one shipped graph template leaves. + include_once($config['base_path'] . '/plugins/cloud/setup.php'); + cloud_boot(); + $id = (int) db_fetch_cell_prepared( + 'SELECT id FROM graph_templates WHERE hash = ?', + array(\Somethingwithproof\Cloud\TemplateRepository::hash('graph_template/' . $argument)) + ); + // The same rows graph_templates.php deletes for a template. + $graphs = array_column( + db_fetch_assoc_prepared('SELECT id FROM snmp_query_graph WHERE graph_template_id = ?', array($id)), + 'id' + ); + + foreach ($graphs as $graph) { + foreach (array('snmp_query_graph_rrd', 'snmp_query_graph_rrd_sv', 'snmp_query_graph_sv') as $table) { + db_execute_prepared('DELETE FROM ' . $table . ' WHERE snmp_query_graph_id = ?', array($graph)); + } + } + + db_execute_prepared( + 'DELETE FROM graph_template_input_defs WHERE graph_template_input_id IN ' . + '(SELECT id FROM graph_template_input WHERE graph_template_id = ?)', + array($id) + ); + + foreach (array('graph_templates', 'snmp_query_graph', 'graph_template_input', 'host_template_graph') as $table) { + db_execute_prepared( + 'DELETE FROM ' . $table . ' WHERE ' . ($table === 'graph_templates' ? 'id' : 'graph_template_id') . ' = ?', + array($id) + ); + } + + db_execute_prepared( + 'DELETE FROM graph_templates_graph WHERE graph_template_id = ? AND local_graph_id = 0', + array($id) + ); + db_execute_prepared( + 'DELETE FROM graph_templates_item WHERE graph_template_id = ? AND local_graph_id = 0', + array($id) + ); + break; case 'drop_table': db_execute('DROP TABLE IF EXISTS `' . preg_replace('/[^a-z_]/', '', $argument) . '`'); @@ -295,4 +345,26 @@ 'c' ), 'tables' => $tables, + // Rows of the tables a template import writes, to show a re-import adds none. + 'template_rows' => array( + 'host_template' => (int) db_fetch_cell('SELECT COUNT(*) FROM host_template'), + 'host_template_snmp' => (int) db_fetch_cell('SELECT COUNT(*) FROM host_template_snmp_query'), + 'snmp_query' => (int) db_fetch_cell('SELECT COUNT(*) FROM snmp_query'), + 'snmp_query_graph' => (int) db_fetch_cell('SELECT COUNT(*) FROM snmp_query_graph'), + 'snmp_query_graph_rrd' => (int) db_fetch_cell('SELECT COUNT(*) FROM snmp_query_graph_rrd'), + 'data_template' => (int) db_fetch_cell('SELECT COUNT(*) FROM data_template'), + 'data_template_rrd' => (int) db_fetch_cell('SELECT COUNT(*) FROM data_template_rrd WHERE local_data_id = 0'), + 'graph_templates' => (int) db_fetch_cell('SELECT COUNT(*) FROM graph_templates'), + 'graph_templates_item' => (int) db_fetch_cell('SELECT COUNT(*) FROM graph_templates_item WHERE local_graph_id = 0'), + 'graph_template_input' => (int) db_fetch_cell('SELECT COUNT(*) FROM graph_template_input'), + ), + 'template_names' => array_column( + db_fetch_assoc("SELECT name FROM graph_templates WHERE name LIKE 'Cloud: %' ORDER BY name"), + 'name' + ), + 'templates_sha' => db_fetch_cell("SELECT value FROM settings WHERE name = 'cloud_templates_sha256'"), + 'resource_files' => array_map( + 'basename', + glob($config['base_path'] . '/resource/script_server/cloud_*.xml') ?: array() + ), ), JSON_PRETTY_PRINT) . PHP_EOL; From 6855265262e83232528dc9704bdf266757ee0905 Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Sun, 15 Nov 2026 01:41:13 -0800 Subject: [PATCH 2/2] refactor: derive template hashes from SHA-256 instead of MD5 Cacti needs 32 hex digits to identify a template object; the first 32 of a SHA-256 over the fixed key serve as well as an MD5 and avoid a weak hash algorithm, which SonarQube Cloud flags regardless of use. The templates are regenerated; nothing has shipped with the old hashes. Signed-off-by: Thomas Vincent --- lib/TemplateRepository.php | 6 +- templates/cloud_digitalocean.xml | 1514 +++++++++++++++--------------- tests/bin/generate-templates.php | 10 +- 3 files changed, 767 insertions(+), 763 deletions(-) diff --git a/lib/TemplateRepository.php b/lib/TemplateRepository.php index 4b7277f..68292df 100644 --- a/lib/TemplateRepository.php +++ b/lib/TemplateRepository.php @@ -105,8 +105,12 @@ public static function objects(): array { return $objects; } + /** + * Cacti identifies template objects by 32 hex digits; a truncated SHA-256 + * of a fixed key gives each object a stable one. Not a security control. + */ public static function hash(string $key): string { - return md5('plugin_cloud/' . $key); + return substr(hash('sha256', 'plugin_cloud/' . $key), 0, 32); } /** diff --git a/templates/cloud_digitalocean.xml b/templates/cloud_digitalocean.xml index 348e788..c11d534 100644 --- a/templates/cloud_digitalocean.xml +++ b/templates/cloud_digitalocean.xml @@ -1,11 +1,11 @@ - + Cloud: DigitalOcean Scope application - hash_0401035bfa70d4a716dcd2e0fc68fb5e0c8063|hash_04010365a822eecf68dba160fe5110fb4ed959 - - + hash_040103fd85703889147ba4f87358f27117676d|hash_04010366f452ea62c5c77feecaa64ff3f1e4c6 + + Cloud: DigitalOcean Droplets - CPU @@ -72,9 +72,9 @@ 0 - + 4 - hash_0801034386c404e78b9a77be5346a8dd3019b1 + hash_0801033c2c5c7bef9af3836c127a740622d809 4668E4 FF 1 @@ -90,10 +90,10 @@ 0 1 - - + + 9 - hash_0801034386c404e78b9a77be5346a8dd3019b1 + hash_0801033c2c5c7bef9af3836c127a740622d809 0 FF 4 @@ -109,10 +109,10 @@ 0 2 - - + + 9 - hash_0801034386c404e78b9a77be5346a8dd3019b1 + hash_0801033c2c5c7bef9af3836c127a740622d809 0 FF 1 @@ -128,10 +128,10 @@ 0 3 - - + + 9 - hash_0801034386c404e78b9a77be5346a8dd3019b1 + hash_0801033c2c5c7bef9af3836c127a740622d809 0 FF 3 @@ -147,18 +147,18 @@ 0 4 - + - + Data Source [do_cpu_pct] task_item_id - hash_00010376ba134b5928a305737d016fbe7337c9|hash_000103ad5af9388d93e34428c56d3b2b934021|hash_00010358ebadadd79faabf785ddc7b4aee9402|hash_000103bdc13f199ec98b240548b17cf0f0e431 - + hash_000103d0b1729673e39a080a29b5e71182d287|hash_0001036d435ed9488886c94d45a8abff1b0788|hash_00010395015d3685e55d67120a9746800c475a|hash_000103d0abbfcf52ff27a0d529bf58e93bf7b9 + - - + + Cloud: DigitalOcean Droplets - Bandwidth @@ -225,9 +225,9 @@ 0 - + 4 - hash_08010315815af0359dda45dd27be828b7f888c + hash_080103749c1c0bff50b3e5efd4de51d04adb69 4668E4 FF 1 @@ -243,10 +243,10 @@ 0 1 - - + + 9 - hash_08010315815af0359dda45dd27be828b7f888c + hash_080103749c1c0bff50b3e5efd4de51d04adb69 0 FF 4 @@ -262,10 +262,10 @@ 0 2 - - + + 9 - hash_08010315815af0359dda45dd27be828b7f888c + hash_080103749c1c0bff50b3e5efd4de51d04adb69 0 FF 1 @@ -281,10 +281,10 @@ 0 3 - - + + 9 - hash_08010315815af0359dda45dd27be828b7f888c + hash_080103749c1c0bff50b3e5efd4de51d04adb69 0 FF 3 @@ -300,10 +300,10 @@ 0 4 - - + + 4 - hash_080103b4012a74aa9256874cce00f892db8d2e + hash_080103bfb1c26e1a42b5e82649936055a62461 00CF00 FF 1 @@ -319,10 +319,10 @@ 0 5 - - + + 9 - hash_080103b4012a74aa9256874cce00f892db8d2e + hash_080103bfb1c26e1a42b5e82649936055a62461 0 FF 4 @@ -338,10 +338,10 @@ 0 6 - - + + 9 - hash_080103b4012a74aa9256874cce00f892db8d2e + hash_080103bfb1c26e1a42b5e82649936055a62461 0 FF 1 @@ -357,10 +357,10 @@ 0 7 - - + + 9 - hash_080103b4012a74aa9256874cce00f892db8d2e + hash_080103bfb1c26e1a42b5e82649936055a62461 0 FF 3 @@ -376,10 +376,10 @@ 0 8 - - + + 4 - hash_080103438da5042072e6fde5889555b6358eec + hash_0801030a8ddbb80268836e955ac18809a9ab8b EA8F00 FF 1 @@ -395,10 +395,10 @@ 0 9 - - + + 9 - hash_080103438da5042072e6fde5889555b6358eec + hash_0801030a8ddbb80268836e955ac18809a9ab8b 0 FF 4 @@ -414,10 +414,10 @@ 0 10 - - + + 9 - hash_080103438da5042072e6fde5889555b6358eec + hash_0801030a8ddbb80268836e955ac18809a9ab8b 0 FF 1 @@ -433,10 +433,10 @@ 0 11 - - + + 9 - hash_080103438da5042072e6fde5889555b6358eec + hash_0801030a8ddbb80268836e955ac18809a9ab8b 0 FF 3 @@ -452,10 +452,10 @@ 0 12 - - + + 4 - hash_080103abdf5479f3988a8f52fb0071b6b0940a + hash_080103330713ba80d37efbf00a3dc9c8ae40cf F51D30 FF 1 @@ -471,10 +471,10 @@ 0 13 - - + + 9 - hash_080103abdf5479f3988a8f52fb0071b6b0940a + hash_080103330713ba80d37efbf00a3dc9c8ae40cf 0 FF 4 @@ -490,10 +490,10 @@ 0 14 - - + + 9 - hash_080103abdf5479f3988a8f52fb0071b6b0940a + hash_080103330713ba80d37efbf00a3dc9c8ae40cf 0 FF 1 @@ -509,10 +509,10 @@ 0 15 - - + + 9 - hash_080103abdf5479f3988a8f52fb0071b6b0940a + hash_080103330713ba80d37efbf00a3dc9c8ae40cf 0 FF 3 @@ -528,36 +528,36 @@ 0 16 - + - + Data Source [do_bw_pub_in] task_item_id - hash_0001035fe856099239aafdc6694f2216611f81|hash_000103bb638e4efa5c87ba04018e6c875a2b95|hash_00010312ad84ecf6b9a5fde3c1ecba746e638b|hash_000103a02381c25a882ed29a48ff77676a01d0 - - + hash_000103d13fe07a1431053ece433f0261dd8c64|hash_00010316656169824454602a2b43df97aef9dd|hash_000103a2ce1e51b4a9638b47cd60555f0d9590|hash_000103f25e0d598f0d938c01098858285f5751 + + Data Source [do_bw_pub_out] task_item_id - hash_0001033fce49d75e660823b873d6f9e866da40|hash_000103d687f3c4b699fb64e7672c4daf70c1b4|hash_000103d914fad43fdfecc7140fd57c4b9105c1|hash_00010369965fd7c70e1ceaefe817740045fef1 - - + hash_0001035e648f9c0edcb1f1c7bafb0830fb0334|hash_00010308dfe02120d32fc2dc98aec70c7b0017|hash_000103d2ec98088c5e4e1c075f7598d34e6267|hash_000103f82a9b8e2f3eb15a8717de5635a76c50 + + Data Source [do_bw_prv_in] task_item_id - hash_000103b956e81f86534f2525e939b58b5c715d|hash_0001032db69fed05d775a8f8afbc1f09877525|hash_00010312cc634280b2e39b3e3e2158bc80ceca|hash_00010333cd09dc44e09291682067e615861c2f - - + hash_00010388c596dcd8667596dba58b7991aa5738|hash_000103c1ba8b5f3d615a8204ed975d035d7a42|hash_0001036f8665dccf035931f69a54227a0e6984|hash_000103f4a018038a1961a3469a0d7b4dc2eb97 + + Data Source [do_bw_prv_out] task_item_id - hash_00010342d9115492d5d8d7a7123b3f3914c5ba|hash_0001038cded969bd22e7e5c3f44f5737eaf94e|hash_000103d9873e82c21636b300b85ccfe11b033b|hash_0001036f9fbc368594745c700599fd05c14156 - + hash_0001032dc2d30bba41b77027f810fed67acf11|hash_000103bdca328cfabf08de0918f9a31f173307|hash_0001030dea1fc290515399a093ec2c2d9606da|hash_0001039a7d260f826862542166fef017281e1e + - - + + Cloud: DigitalOcean Droplets - Load Average @@ -624,9 +624,9 @@ 0 - + 4 - hash_080103db82538a096d38ff3cb779b61835fa67 + hash_0801037f5c3372f415b68c01bec323326a96a1 4668E4 FF 1 @@ -642,10 +642,10 @@ 0 1 - - + + 9 - hash_080103db82538a096d38ff3cb779b61835fa67 + hash_0801037f5c3372f415b68c01bec323326a96a1 0 FF 4 @@ -661,10 +661,10 @@ 0 2 - - + + 9 - hash_080103db82538a096d38ff3cb779b61835fa67 + hash_0801037f5c3372f415b68c01bec323326a96a1 0 FF 1 @@ -680,10 +680,10 @@ 0 3 - - + + 9 - hash_080103db82538a096d38ff3cb779b61835fa67 + hash_0801037f5c3372f415b68c01bec323326a96a1 0 FF 3 @@ -699,10 +699,10 @@ 0 4 - - + + 4 - hash_080103bf75b68252e387259dd57016b0edafa9 + hash_080103451b06faafa516ef55eef1a3cecff70b 00CF00 FF 1 @@ -718,10 +718,10 @@ 0 5 - - + + 9 - hash_080103bf75b68252e387259dd57016b0edafa9 + hash_080103451b06faafa516ef55eef1a3cecff70b 0 FF 4 @@ -737,10 +737,10 @@ 0 6 - - + + 9 - hash_080103bf75b68252e387259dd57016b0edafa9 + hash_080103451b06faafa516ef55eef1a3cecff70b 0 FF 1 @@ -756,10 +756,10 @@ 0 7 - - + + 9 - hash_080103bf75b68252e387259dd57016b0edafa9 + hash_080103451b06faafa516ef55eef1a3cecff70b 0 FF 3 @@ -775,10 +775,10 @@ 0 8 - - + + 4 - hash_0801037c44f770c69bb104a0881d60f8716cf7 + hash_0801030182ca5e8103dbf8bedd2f2c3fdb51c3 EA8F00 FF 1 @@ -794,10 +794,10 @@ 0 9 - - + + 9 - hash_0801037c44f770c69bb104a0881d60f8716cf7 + hash_0801030182ca5e8103dbf8bedd2f2c3fdb51c3 0 FF 4 @@ -813,10 +813,10 @@ 0 10 - - + + 9 - hash_0801037c44f770c69bb104a0881d60f8716cf7 + hash_0801030182ca5e8103dbf8bedd2f2c3fdb51c3 0 FF 1 @@ -832,10 +832,10 @@ 0 11 - - + + 9 - hash_0801037c44f770c69bb104a0881d60f8716cf7 + hash_0801030182ca5e8103dbf8bedd2f2c3fdb51c3 0 FF 3 @@ -851,30 +851,30 @@ 0 12 - + - + Data Source [do_load_1] task_item_id - hash_0001034b3e2032ba4cc0f7d726ceffb8a8649a|hash_000103ca0e5f7e3fa03b8a2e299047826d7717|hash_00010371bd8056c65664bc8ec81b6a299f2a1e|hash_000103f913b519f786145875f459de61cee327 - - + hash_0001034285f04f8b78ee2bc23f7f1aac6946f4|hash_00010383244e72c2241ac310d8c8a2d2312c10|hash_000103fe33f2625140df03cee9b83e4c644bc7|hash_00010394b0898dde5ce1e8b3fea1a9f7e59496 + + Data Source [do_load_5] task_item_id - hash_000103df36773ac7ba57349686a0275dc22238|hash_000103b3248cda539435d8fc4ed59ed143f017|hash_0001031d0da4e77bc56ac4df6aea25cc5f0921|hash_000103926a1ba91b00ded8f5d79ce946a76669 - - + hash_00010364c8eac3d934cc7e95957b74b0b2bafe|hash_0001037ce992973943fdf734c1077f3aedec23|hash_0001031b757dd4be7795d690131e108fecc5db|hash_000103be86fd982ea56b0303ea4ce702cbf9e8 + + Data Source [do_load_15] task_item_id - hash_00010370d23e61f6f31840f9ec976e68423bb5|hash_00010392d2d55dbccae335f5cc51d00e1e6165|hash_0001031a04751d45be9efe2ab94b9ed46906ce|hash_000103ab860d44a07c6be6b52a376b98de5ae1 - + hash_000103eacb96ae9a7960ad44dff754f781f7bd|hash_0001033a54e2e3f80bda0a392239624104a529|hash_000103b3c8154b8c2cb2a9cbc75691e7141fb0|hash_0001038c1f52eeabdd8892a7a5e0cdfa70354e + - - + + Cloud: DigitalOcean Droplets - Memory @@ -941,9 +941,9 @@ 0 - + 4 - hash_080103071c9470d231ba7e986ce4eb3af669ba + hash_0801036df5be35faa0d89df210629887cbd56e 4668E4 FF 1 @@ -959,10 +959,10 @@ 0 1 - - + + 9 - hash_080103071c9470d231ba7e986ce4eb3af669ba + hash_0801036df5be35faa0d89df210629887cbd56e 0 FF 4 @@ -978,10 +978,10 @@ 0 2 - - + + 9 - hash_080103071c9470d231ba7e986ce4eb3af669ba + hash_0801036df5be35faa0d89df210629887cbd56e 0 FF 1 @@ -997,10 +997,10 @@ 0 3 - - + + 9 - hash_080103071c9470d231ba7e986ce4eb3af669ba + hash_0801036df5be35faa0d89df210629887cbd56e 0 FF 3 @@ -1016,10 +1016,10 @@ 0 4 - - + + 4 - hash_080103c256012a2342382020f35099cbbdec0d + hash_08010320d1c13571a6bce92070f77bb2b67cd5 00CF00 FF 1 @@ -1035,10 +1035,10 @@ 0 5 - - + + 9 - hash_080103c256012a2342382020f35099cbbdec0d + hash_08010320d1c13571a6bce92070f77bb2b67cd5 0 FF 4 @@ -1054,10 +1054,10 @@ 0 6 - - + + 9 - hash_080103c256012a2342382020f35099cbbdec0d + hash_08010320d1c13571a6bce92070f77bb2b67cd5 0 FF 1 @@ -1073,10 +1073,10 @@ 0 7 - - + + 9 - hash_080103c256012a2342382020f35099cbbdec0d + hash_08010320d1c13571a6bce92070f77bb2b67cd5 0 FF 3 @@ -1092,10 +1092,10 @@ 0 8 - - + + 4 - hash_08010310348b5e0f6d7dfc97406fa97b041a47 + hash_0801037da676ae11671af4e15bacf2819ec7b8 EA8F00 FF 1 @@ -1111,10 +1111,10 @@ 0 9 - - + + 9 - hash_08010310348b5e0f6d7dfc97406fa97b041a47 + hash_0801037da676ae11671af4e15bacf2819ec7b8 0 FF 4 @@ -1130,10 +1130,10 @@ 0 10 - - + + 9 - hash_08010310348b5e0f6d7dfc97406fa97b041a47 + hash_0801037da676ae11671af4e15bacf2819ec7b8 0 FF 1 @@ -1149,10 +1149,10 @@ 0 11 - - + + 9 - hash_08010310348b5e0f6d7dfc97406fa97b041a47 + hash_0801037da676ae11671af4e15bacf2819ec7b8 0 FF 3 @@ -1168,10 +1168,10 @@ 0 12 - - + + 4 - hash_080103baab536c8205e475beaa2e152bbd7ad3 + hash_080103f57286dad5daa773dcc475fe191e5b34 F51D30 FF 1 @@ -1187,10 +1187,10 @@ 0 13 - - + + 9 - hash_080103baab536c8205e475beaa2e152bbd7ad3 + hash_080103f57286dad5daa773dcc475fe191e5b34 0 FF 4 @@ -1206,10 +1206,10 @@ 0 14 - - + + 9 - hash_080103baab536c8205e475beaa2e152bbd7ad3 + hash_080103f57286dad5daa773dcc475fe191e5b34 0 FF 1 @@ -1225,10 +1225,10 @@ 0 15 - - + + 9 - hash_080103baab536c8205e475beaa2e152bbd7ad3 + hash_080103f57286dad5daa773dcc475fe191e5b34 0 FF 3 @@ -1244,36 +1244,36 @@ 0 16 - + - + Data Source [do_mem_total] task_item_id - hash_0001030c25f0662920a2017a8dfb9ee4743843|hash_000103385bb175293d640467e2754c9505b3c4|hash_000103545765a193ba0eab5607bb2324783e39|hash_0001032d40f6f392a18a47ddd9ccdcfe874689 - - + hash_00010331b67dc9a2c3a3f2e870c49d92d582a8|hash_00010396f5445081bf2e6ef007a8ff9d127812|hash_00010308eb797e80daaa60e8b111a5d0683626|hash_000103f2c8face43ed8eac63e3c17b4466c391 + + Data Source [do_mem_avail] task_item_id - hash_0001033e1dbd50ba8ae16a064ec2c97fd7a6e0|hash_0001033ce4db073505fb7804756dcfc43e0dbf|hash_0001035399e27a438f8ebb556c43eeeb31392d|hash_000103c9fffdfdda7bcfb634385118573450e9 - - + hash_0001033f5de24dced9f2594a21f9aa2002264b|hash_000103abe58cc99fbbb4d8f9045f160e69057d|hash_0001036538489493e28e32a9320c31e405b022|hash_000103302e2c36afaa03a19c301f16219db278 + + Data Source [do_mem_free] task_item_id - hash_000103548fbfc96e53a0b72aed838966e00421|hash_0001035d4f77cdb80c19687bd2f0dab175eecb|hash_000103387aa70cb5d98a7494037bad5f3f477f|hash_00010309848484b425a73b6c5801188302ce20 - - + hash_0001036010244a30d29e6ce891d487305e4f1a|hash_000103fcc9a47a8dfd69ecf97c9ef26c44131d|hash_000103b62f61e9f9d39de0d15dabdd611b3157|hash_0001036220e5ac28ee7bcc8387e0d5edc68eae + + Data Source [do_mem_cached] task_item_id - hash_000103ea916c9efe58200637b4d065e68af6b9|hash_00010386feb492bba81316ace95cc65c86ae1e|hash_000103aa0281c4bce4cb6c23552cba2017978d|hash_000103d16fe1aa35a5a7c9d5e9125a8cccaa10 - + hash_000103b940d1da5855f842987f256f9cfd4ebf|hash_0001030b58202b5a8c0ccc49781315e3fb206c|hash_000103a9c111d6c62b836bcd734380971d97cc|hash_000103395db9fc5f87581b9ca654379588b57f + - - + + Cloud: DigitalOcean Droplets - Collection Age @@ -1340,9 +1340,9 @@ 0 - + 4 - hash_080103ec1614dd14f68e78b8fa6a83107cf301 + hash_0801031a276645bb64ecf3200afd99ab80de7e 4668E4 FF 1 @@ -1358,10 +1358,10 @@ 0 1 - - + + 9 - hash_080103ec1614dd14f68e78b8fa6a83107cf301 + hash_0801031a276645bb64ecf3200afd99ab80de7e 0 FF 4 @@ -1377,10 +1377,10 @@ 0 2 - - + + 9 - hash_080103ec1614dd14f68e78b8fa6a83107cf301 + hash_0801031a276645bb64ecf3200afd99ab80de7e 0 FF 1 @@ -1396,10 +1396,10 @@ 0 3 - - + + 9 - hash_080103ec1614dd14f68e78b8fa6a83107cf301 + hash_0801031a276645bb64ecf3200afd99ab80de7e 0 FF 3 @@ -1415,18 +1415,18 @@ 0 4 - + - + Data Source [do_age] task_item_id - hash_0001036a2c4e9c0afed36d761060ddac971a4d|hash_0001039b4d41cc21dc1b48e5344e96f23bc451|hash_000103c5ed2e4bdcfbe301fabdeb58206fbbcc|hash_00010359641c99ab8523c34d4eaf8eaa5aa1da - + hash_000103a47f40650d6e7eebe66ba13408fad7c6|hash_0001034f14eb8929d9f379e3fa20a9a0da74e4|hash_000103f5f9f1c98ea892dd217eb9d407b9aac4|hash_00010375f56330d16931b28a335068e0a12726 + - - + + Cloud: DigitalOcean Load Balancers - Connections @@ -1493,9 +1493,9 @@ 0 - + 4 - hash_080103af0dc885a37f1885baa3746e2efbaf94 + hash_08010356c4730492f7625f7fef993b58dd67a6 4668E4 FF 1 @@ -1511,10 +1511,10 @@ 0 1 - - + + 9 - hash_080103af0dc885a37f1885baa3746e2efbaf94 + hash_08010356c4730492f7625f7fef993b58dd67a6 0 FF 4 @@ -1530,10 +1530,10 @@ 0 2 - - + + 9 - hash_080103af0dc885a37f1885baa3746e2efbaf94 + hash_08010356c4730492f7625f7fef993b58dd67a6 0 FF 1 @@ -1549,10 +1549,10 @@ 0 3 - - + + 9 - hash_080103af0dc885a37f1885baa3746e2efbaf94 + hash_08010356c4730492f7625f7fef993b58dd67a6 0 FF 3 @@ -1568,10 +1568,10 @@ 0 4 - - + + 4 - hash_08010328c03a47b34e3032f3c956549d6c608b + hash_080103cd4ed9243937fc1da5cf3b24db9e8c4f 00CF00 FF 1 @@ -1587,10 +1587,10 @@ 0 5 - - + + 9 - hash_08010328c03a47b34e3032f3c956549d6c608b + hash_080103cd4ed9243937fc1da5cf3b24db9e8c4f 0 FF 4 @@ -1606,10 +1606,10 @@ 0 6 - - + + 9 - hash_08010328c03a47b34e3032f3c956549d6c608b + hash_080103cd4ed9243937fc1da5cf3b24db9e8c4f 0 FF 1 @@ -1625,10 +1625,10 @@ 0 7 - - + + 9 - hash_08010328c03a47b34e3032f3c956549d6c608b + hash_080103cd4ed9243937fc1da5cf3b24db9e8c4f 0 FF 3 @@ -1644,24 +1644,24 @@ 0 8 - + - + Data Source [dolb_conn_cur] task_item_id - hash_0001031eaebdc3c2e6de3aa049411f96507ff9|hash_000103066552dec61cc3b6974f588af7086097|hash_00010377cd2be03729fa79fbb026cf0de4741d|hash_00010392248a974db16049085572126e8a0e8e - - + hash_0001030b894313e812e739acbca2392883f4b8|hash_00010316cf5f2f19706c1c23cb02e3f4aaab04|hash_0001031edaac3a9bab03ffca303b080f363929|hash_000103133410ddfd6e6eeff831cf51a8bf24ff + + Data Source [dolb_conn_lim] task_item_id - hash_000103096a81e350412e25c0068620fb3f8c7c|hash_0001030559942b68d737a23d1ba04d9c3bfd39|hash_00010383eab3c7f9bb261c29043716e6b51787|hash_000103f90180c0641367160389a7e187cea5d5 - + hash_00010344dc9fb1d62542a63405446cb2e1d63e|hash_000103e687b8e254ddf17114815b97203fe403|hash_00010348c79f9c6f6075ce91c3b109ccd39406|hash_000103e05a36634b607b1155b102d52e0640ca + - - + + Cloud: DigitalOcean Load Balancers - CPU @@ -1728,9 +1728,9 @@ 0 - + 4 - hash_080103b4bfa3d1771c2f5f6a521a49682f594f + hash_080103b1297692bf7855828cc680acf8a0fe17 4668E4 FF 1 @@ -1746,10 +1746,10 @@ 0 1 - - + + 9 - hash_080103b4bfa3d1771c2f5f6a521a49682f594f + hash_080103b1297692bf7855828cc680acf8a0fe17 0 FF 4 @@ -1765,10 +1765,10 @@ 0 2 - - + + 9 - hash_080103b4bfa3d1771c2f5f6a521a49682f594f + hash_080103b1297692bf7855828cc680acf8a0fe17 0 FF 1 @@ -1784,10 +1784,10 @@ 0 3 - - + + 9 - hash_080103b4bfa3d1771c2f5f6a521a49682f594f + hash_080103b1297692bf7855828cc680acf8a0fe17 0 FF 3 @@ -1803,18 +1803,18 @@ 0 4 - + - + Data Source [dolb_cpu_pct] task_item_id - hash_000103ca76e6636cae01704f4b41c99c2fb1cd|hash_000103538a9b281e496a816d6231dee8ff8080|hash_00010314c2f7a06254d58cdba99141f2caf6be|hash_000103ef1f76937550bb17caf35cf50835b18f - + hash_000103c4b7c3577e821e6136194ee53606e68a|hash_000103a34b31544a6cac88ad4742bcb01aa3fb|hash_00010302d565855b9c9edd40cad52288116fe7|hash_00010372ae471db17d910d98462d67cc33bab8 + - - + + Cloud: DigitalOcean Load Balancers - HTTP Requests @@ -1881,9 +1881,9 @@ 0 - + 4 - hash_0801033554656861fc21f55f146b2fda7fb4c5 + hash_0801034c8470f6ff72c7f3aedb5be0c0382280 4668E4 FF 1 @@ -1899,10 +1899,10 @@ 0 1 - - + + 9 - hash_0801033554656861fc21f55f146b2fda7fb4c5 + hash_0801034c8470f6ff72c7f3aedb5be0c0382280 0 FF 4 @@ -1918,10 +1918,10 @@ 0 2 - - + + 9 - hash_0801033554656861fc21f55f146b2fda7fb4c5 + hash_0801034c8470f6ff72c7f3aedb5be0c0382280 0 FF 1 @@ -1937,10 +1937,10 @@ 0 3 - - + + 9 - hash_0801033554656861fc21f55f146b2fda7fb4c5 + hash_0801034c8470f6ff72c7f3aedb5be0c0382280 0 FF 3 @@ -1956,18 +1956,18 @@ 0 4 - + - + Data Source [dolb_http_rps] task_item_id - hash_00010390f6eb0675b8e73c7332acbd3a7e880d|hash_00010322817b3580d94b3b500fdd49ed6c3ff1|hash_0001038a4267969fe54e14c094c5d5a7c37a01|hash_000103c64cd01ae08db72e1ce7bc1e3cb81e84 - + hash_000103389369f3e4b2cd8fb7317fc17a80e5e4|hash_00010313a78911e159e546460d7d99a4db108b|hash_0001038daea89de4fcd3eb88daa74a94a715fb|hash_0001037feae740e040af050a6cb4adeed9ca33 + - - + + Cloud: DigitalOcean Load Balancers - HTTP Responses @@ -2034,9 +2034,9 @@ 0 - + 4 - hash_080103c837c84916127062033147fb69d430c1 + hash_080103e0db6738c617410a308f0b61966e4e85 4668E4 FF 1 @@ -2052,10 +2052,10 @@ 0 1 - - + + 9 - hash_080103c837c84916127062033147fb69d430c1 + hash_080103e0db6738c617410a308f0b61966e4e85 0 FF 4 @@ -2071,10 +2071,10 @@ 0 2 - - + + 9 - hash_080103c837c84916127062033147fb69d430c1 + hash_080103e0db6738c617410a308f0b61966e4e85 0 FF 1 @@ -2090,10 +2090,10 @@ 0 3 - - + + 9 - hash_080103c837c84916127062033147fb69d430c1 + hash_080103e0db6738c617410a308f0b61966e4e85 0 FF 3 @@ -2109,18 +2109,18 @@ 0 4 - + - + Data Source [dolb_http_resp] task_item_id - hash_000103022caf942f53f8cf1a34377ee66564f9|hash_0001030dd0145ff27cff0327f3d910df7c6e49|hash_000103139a1d2a87398e44db789a6af6e1393f|hash_000103a09645bc2b03802c39f6bae32360982e - + hash_000103b0ab162d78accdb1c5f335adc84a21ff|hash_00010347962903301ec892f183c12817fe822d|hash_0001031b89ef0210a44fd3b188ae1786b92601|hash_0001036b0ef11238fc77c4dfe528ef16030a5c + - - + + Cloud: DigitalOcean Load Balancers - Throughput @@ -2187,9 +2187,9 @@ 0 - + 4 - hash_08010304d94f156e617662058f507fd17aa8dd + hash_0801034b416d31b14a410b0d9fc267d6c673ea 4668E4 FF 1 @@ -2205,10 +2205,10 @@ 0 1 - - + + 9 - hash_08010304d94f156e617662058f507fd17aa8dd + hash_0801034b416d31b14a410b0d9fc267d6c673ea 0 FF 4 @@ -2224,10 +2224,10 @@ 0 2 - - + + 9 - hash_08010304d94f156e617662058f507fd17aa8dd + hash_0801034b416d31b14a410b0d9fc267d6c673ea 0 FF 1 @@ -2243,10 +2243,10 @@ 0 3 - - + + 9 - hash_08010304d94f156e617662058f507fd17aa8dd + hash_0801034b416d31b14a410b0d9fc267d6c673ea 0 FF 3 @@ -2262,10 +2262,10 @@ 0 4 - - + + 4 - hash_080103c0e4a6d447e5be1180d3db907aef281b + hash_08010373ab165625ccf2e9c839f2547dd03751 00CF00 FF 1 @@ -2281,10 +2281,10 @@ 0 5 - - + + 9 - hash_080103c0e4a6d447e5be1180d3db907aef281b + hash_08010373ab165625ccf2e9c839f2547dd03751 0 FF 4 @@ -2300,10 +2300,10 @@ 0 6 - - + + 9 - hash_080103c0e4a6d447e5be1180d3db907aef281b + hash_08010373ab165625ccf2e9c839f2547dd03751 0 FF 1 @@ -2319,10 +2319,10 @@ 0 7 - - + + 9 - hash_080103c0e4a6d447e5be1180d3db907aef281b + hash_08010373ab165625ccf2e9c839f2547dd03751 0 FF 3 @@ -2338,10 +2338,10 @@ 0 8 - - + + 4 - hash_080103e9069fda9165ea96860ecf7b74964722 + hash_0801032937d61b18729675c0df26e68b8f3250 EA8F00 FF 1 @@ -2357,10 +2357,10 @@ 0 9 - - + + 9 - hash_080103e9069fda9165ea96860ecf7b74964722 + hash_0801032937d61b18729675c0df26e68b8f3250 0 FF 4 @@ -2376,10 +2376,10 @@ 0 10 - - + + 9 - hash_080103e9069fda9165ea96860ecf7b74964722 + hash_0801032937d61b18729675c0df26e68b8f3250 0 FF 1 @@ -2395,10 +2395,10 @@ 0 11 - - + + 9 - hash_080103e9069fda9165ea96860ecf7b74964722 + hash_0801032937d61b18729675c0df26e68b8f3250 0 FF 3 @@ -2414,10 +2414,10 @@ 0 12 - - + + 4 - hash_080103ad694cf8f6cc1a787c33f7ca0aa00fbd + hash_0801039966c69c86b3a7f60497a61e978d93fa F51D30 FF 1 @@ -2433,10 +2433,10 @@ 0 13 - - + + 9 - hash_080103ad694cf8f6cc1a787c33f7ca0aa00fbd + hash_0801039966c69c86b3a7f60497a61e978d93fa 0 FF 4 @@ -2452,10 +2452,10 @@ 0 14 - - + + 9 - hash_080103ad694cf8f6cc1a787c33f7ca0aa00fbd + hash_0801039966c69c86b3a7f60497a61e978d93fa 0 FF 1 @@ -2471,10 +2471,10 @@ 0 15 - - + + 9 - hash_080103ad694cf8f6cc1a787c33f7ca0aa00fbd + hash_0801039966c69c86b3a7f60497a61e978d93fa 0 FF 3 @@ -2490,10 +2490,10 @@ 0 16 - - + + 4 - hash_0801032a7fb385707dffed06f4fb4301d3cc3f + hash_080103f83f7ed56ef9cb28643ecdeb13cf410a 8D00BA FF 1 @@ -2509,10 +2509,10 @@ 0 17 - - + + 9 - hash_0801032a7fb385707dffed06f4fb4301d3cc3f + hash_080103f83f7ed56ef9cb28643ecdeb13cf410a 0 FF 4 @@ -2528,10 +2528,10 @@ 0 18 - - + + 9 - hash_0801032a7fb385707dffed06f4fb4301d3cc3f + hash_080103f83f7ed56ef9cb28643ecdeb13cf410a 0 FF 1 @@ -2547,10 +2547,10 @@ 0 19 - - + + 9 - hash_0801032a7fb385707dffed06f4fb4301d3cc3f + hash_080103f83f7ed56ef9cb28643ecdeb13cf410a 0 FF 3 @@ -2566,42 +2566,42 @@ 0 20 - + - + Data Source [dolb_http_Bps] task_item_id - hash_000103dee6c82c405fcbbeed1043998a78a3a0|hash_0001033194aea9e95a6fb453891e63ed5e59a8|hash_000103a1bbc5c9d59c3cf76fa3a853e1eb07fd|hash_000103d55b95d9ce56b8ba0968ea16aa9f38a3 - - + hash_0001031d0206be6d7f681bcc719bfde619d83c|hash_00010307b20e5660baf8c85f10f312d15e6acd|hash_000103707093778a76afe65c009b057623bbb8|hash_0001038e5b3ebc0869b3b5415ec57196758678 + + Data Source [dolb_tcp_Bps] task_item_id - hash_000103678426e521a80c1bc25488a5491e11d8|hash_0001039b705a430e5edc0cc64e125a57178cc2|hash_0001039b5a69cf0ebf927264dd314f4831a33a|hash_0001030040a418e05f36d9dbc86dcebacb67a0 - - + hash_000103f08452429634d52cbc8e1bf8f819a8b2|hash_000103dfefe2acad2ef40d8e0d7f85681780d8|hash_000103a94dc26fc471aca71863384fe22e4c71|hash_000103d73571dbee4efc2b4c3df57376b86ee2 + + Data Source [dolb_udp_Bps] task_item_id - hash_000103d682e5ba1ba97af5ae8f60b714bfe1c6|hash_000103428ae1d889efef9303d5a5a7a186f62e|hash_00010320a7b9cc95c9e70fee178f0d9a932157|hash_000103017e553fd0b3876fe874c5c6631e35b5 - - + hash_000103dfbc240f028856bb200412229aaa3ab0|hash_0001031cea7d310130cc05757459e3e99307e3|hash_00010340e635e7597982ac677b427605e22ac2|hash_000103af44824776a0cb71381f59840263bf42 + + Data Source [dolb_nlbtcp_Bps] task_item_id - hash_000103d3255984b07cb96ebaa8de764794d9fa|hash_0001034c10fd4b6c263547bc9d48d080cda500|hash_000103e5af46437832e584f65c87b3e84146de|hash_000103c4c67fcd3c9abb9af4be5e270cf3ae3b - - + hash_000103adc6dcf10e0389a1f3ee05701503fed7|hash_0001038e89ee202231faa86a9b71edcecca77d|hash_00010342fc331044d666fd5c70d727baf018e3|hash_000103dd1279f34cd0e9bf09209831bd020f72 + + Data Source [dolb_nlbudp_Bps] task_item_id - hash_00010356019f4d4c86fa18f1911f5c0237eacd|hash_000103b9d3bb2845da47b7da9c9e0355fcf7a7|hash_00010371a897f7fb333b4e3b2d6ccf2c0fbc29|hash_000103fd842b0f175b35435847870eebb386eb - + hash_0001033b557124d4caaf3b9a99f484482b6da9|hash_000103105c294efdfcd62b36065f6e2ea6c337|hash_000103a6aee71ce81743e0d840a3b64ecc22dc|hash_000103f02068e6751d92b0dbb379ebb6600c35 + - - + + Cloud: DigitalOcean Load Balancers - Health Checks @@ -2668,9 +2668,9 @@ 0 - + 4 - hash_0801039dc83d3d932784e727329d5b2a2657fe + hash_0801039d3647952c70565cd8979e05bb534b32 4668E4 FF 1 @@ -2686,10 +2686,10 @@ 0 1 - - + + 9 - hash_0801039dc83d3d932784e727329d5b2a2657fe + hash_0801039d3647952c70565cd8979e05bb534b32 0 FF 4 @@ -2705,10 +2705,10 @@ 0 2 - - + + 9 - hash_0801039dc83d3d932784e727329d5b2a2657fe + hash_0801039d3647952c70565cd8979e05bb534b32 0 FF 1 @@ -2724,10 +2724,10 @@ 0 3 - - + + 9 - hash_0801039dc83d3d932784e727329d5b2a2657fe + hash_0801039d3647952c70565cd8979e05bb534b32 0 FF 3 @@ -2743,18 +2743,18 @@ 0 4 - + - + Data Source [dolb_hc_status] task_item_id - hash_00010342415d5e4cbcc4a4dd9f1043d7bc4eb4|hash_0001034215c01105c709afe2a9a88cce22d9d7|hash_000103b3d79555b629d088033b2697c10e255c|hash_00010341b16fecfd0429753a33d3dea6c91c14 - + hash_0001037aeb2320460df51c6a7ebf41e98e1910|hash_000103ddae12b000fa1f08339c7978c0260b7f|hash_0001036d668edbd19f97e9348600f78a9e0f79|hash_0001036e4650eb87eb6e323a292dcd079f9616 + - - + + Cloud: DigitalOcean Load Balancers - Downtime @@ -2821,9 +2821,9 @@ 0 - + 4 - hash_080103c34f29ccdb91f4bf8080b9b1175eccd0 + hash_080103f46a542535d4633d92b8ad6afc00ac6f 4668E4 FF 1 @@ -2839,10 +2839,10 @@ 0 1 - - + + 9 - hash_080103c34f29ccdb91f4bf8080b9b1175eccd0 + hash_080103f46a542535d4633d92b8ad6afc00ac6f 0 FF 4 @@ -2858,10 +2858,10 @@ 0 2 - - + + 9 - hash_080103c34f29ccdb91f4bf8080b9b1175eccd0 + hash_080103f46a542535d4633d92b8ad6afc00ac6f 0 FF 1 @@ -2877,10 +2877,10 @@ 0 3 - - + + 9 - hash_080103c34f29ccdb91f4bf8080b9b1175eccd0 + hash_080103f46a542535d4633d92b8ad6afc00ac6f 0 FF 3 @@ -2896,18 +2896,18 @@ 0 4 - + - + Data Source [dolb_downtime] task_item_id - hash_000103ddb6ca95e134938cc9806f52b58ba9ad|hash_0001034c3aa9d051adbbbcade84f14c594ccd3|hash_000103afc3016649c536bb05d32c74978a22dc|hash_000103eea53edaf69e0d184dab4abb93b4e5f5 - + hash_00010353587a018b7b3e1cee560da63360a0b5|hash_000103ebc393caa830dd457ff6e2f19678db8b|hash_0001038cff89255552e8c2f7a3bb0502f746b1|hash_0001036a5d9c55b1d794a96023ad6dcab88ff4 + - - + + Cloud: DigitalOcean Load Balancers - Response Time @@ -2974,9 +2974,9 @@ 0 - + 4 - hash_0801033e6006ed0f73462fd0257fabe92ecf4f + hash_080103e11379b894f9694d84cd2deb70643af5 4668E4 FF 1 @@ -2992,10 +2992,10 @@ 0 1 - - + + 9 - hash_0801033e6006ed0f73462fd0257fabe92ecf4f + hash_080103e11379b894f9694d84cd2deb70643af5 0 FF 4 @@ -3011,10 +3011,10 @@ 0 2 - - + + 9 - hash_0801033e6006ed0f73462fd0257fabe92ecf4f + hash_080103e11379b894f9694d84cd2deb70643af5 0 FF 1 @@ -3030,10 +3030,10 @@ 0 3 - - + + 9 - hash_0801033e6006ed0f73462fd0257fabe92ecf4f + hash_080103e11379b894f9694d84cd2deb70643af5 0 FF 3 @@ -3049,10 +3049,10 @@ 0 4 - - + + 4 - hash_080103c0070b529ad5d8cf9e2f7fe632642f59 + hash_0801031fd6548138c2c4f26a2c1f3edb22fff6 00CF00 FF 1 @@ -3068,10 +3068,10 @@ 0 5 - - + + 9 - hash_080103c0070b529ad5d8cf9e2f7fe632642f59 + hash_0801031fd6548138c2c4f26a2c1f3edb22fff6 0 FF 4 @@ -3087,10 +3087,10 @@ 0 6 - - + + 9 - hash_080103c0070b529ad5d8cf9e2f7fe632642f59 + hash_0801031fd6548138c2c4f26a2c1f3edb22fff6 0 FF 1 @@ -3106,10 +3106,10 @@ 0 7 - - + + 9 - hash_080103c0070b529ad5d8cf9e2f7fe632642f59 + hash_0801031fd6548138c2c4f26a2c1f3edb22fff6 0 FF 3 @@ -3125,24 +3125,24 @@ 0 8 - + - + Data Source [dolb_resp_avg_s] task_item_id - hash_000103b657cf6e26b802aac6c702c3d61d7431|hash_0001037c335727d54f9a75704f7f372d9d74b7|hash_00010309ce83e3158bcb28349ab90ab134fac3|hash_00010342f1613f0b9cdef1216b25a7658149a2 - - + hash_0001035f6a3cc74b5126d4950dce9033680d2a|hash_0001035cd52efdee2f7db4547781544c21f99c|hash_000103c25748197edbdeb6c413ad588d390a72|hash_00010387cc504050f210d6f68e8ebe5026b829 + + Data Source [dolb_resp_p95_s] task_item_id - hash_00010366cd1e248cf0a2ee5f736291f7b57973|hash_00010370a2ff34117872e97985b777c1244e5b|hash_00010380078efa49181312efbd15606a7e8c39|hash_00010395c37d6a71ba4b674f79d347401841fd - + hash_000103177a518e908f29668666708f14f5d960|hash_000103b0813ed7173476ed6a638e430d4fa862|hash_000103719ccd390903e7a81348bbfbb5f19205|hash_00010341cc1488efd558979cbc94c6c2a6362a + - - + + Cloud: DigitalOcean Load Balancers - Droplet Connections @@ -3209,9 +3209,9 @@ 0 - + 4 - hash_0801038341453059c4388c97b6d2974d80505f + hash_080103544c1e62c9ec4d933b5c0b80d48adfd6 4668E4 FF 1 @@ -3227,10 +3227,10 @@ 0 1 - - + + 9 - hash_0801038341453059c4388c97b6d2974d80505f + hash_080103544c1e62c9ec4d933b5c0b80d48adfd6 0 FF 4 @@ -3246,10 +3246,10 @@ 0 2 - - + + 9 - hash_0801038341453059c4388c97b6d2974d80505f + hash_080103544c1e62c9ec4d933b5c0b80d48adfd6 0 FF 1 @@ -3265,10 +3265,10 @@ 0 3 - - + + 9 - hash_0801038341453059c4388c97b6d2974d80505f + hash_080103544c1e62c9ec4d933b5c0b80d48adfd6 0 FF 3 @@ -3284,10 +3284,10 @@ 0 4 - - + + 4 - hash_0801037db2d786f1323bbd4406f93c3f16b39a + hash_080103bd0a12aeba3deda34eaed14aa48cd3b3 00CF00 FF 1 @@ -3303,10 +3303,10 @@ 0 5 - - + + 9 - hash_0801037db2d786f1323bbd4406f93c3f16b39a + hash_080103bd0a12aeba3deda34eaed14aa48cd3b3 0 FF 4 @@ -3322,10 +3322,10 @@ 0 6 - - + + 9 - hash_0801037db2d786f1323bbd4406f93c3f16b39a + hash_080103bd0a12aeba3deda34eaed14aa48cd3b3 0 FF 1 @@ -3341,10 +3341,10 @@ 0 7 - - + + 9 - hash_0801037db2d786f1323bbd4406f93c3f16b39a + hash_080103bd0a12aeba3deda34eaed14aa48cd3b3 0 FF 3 @@ -3360,24 +3360,24 @@ 0 8 - + - + Data Source [dolb_back_conn] task_item_id - hash_00010336458972503e732109ff5e9fa25e080f|hash_0001039a19500a41ba4ae6101eb410d398f96d|hash_00010322f31fbf59a1d90df9e01a709765f5e8|hash_0001030c58247eebf91d4a28c2dd91f6a21a52 - - + hash_00010368259178c89dac6fe8f123b06c0f32f4|hash_0001030b947f9b45098d7b03d8ef2713601c94|hash_000103829b2074daf28d86a26c98318f9874e8|hash_000103c598951a50e372962d15878dc4ab9a32 + + Data Source [dolb_queue] task_item_id - hash_000103f52730c57e48a4e66c31384756d29ca0|hash_0001034211ee595519638599c523ad43e357f1|hash_000103edf602c2d94e849e6a43f83250793533|hash_000103ac105f191f3700bcbfde25253188aeb3 - + hash_0001037c146d22614712fc9ceb3ce31da720d1|hash_0001032f1dd16484fb9072ee8f463c090763f5|hash_000103281562a812698ff1bc175a74c1d307f0|hash_000103f08f36c2b392d717be1079e54005f31c + - - + + Cloud: DigitalOcean Load Balancers - Collection Age @@ -3444,9 +3444,9 @@ 0 - + 4 - hash_080103324e22df4d579128205db3058caa02e9 + hash_080103408442758bfcd410cc839470f94da413 4668E4 FF 1 @@ -3462,10 +3462,10 @@ 0 1 - - + + 9 - hash_080103324e22df4d579128205db3058caa02e9 + hash_080103408442758bfcd410cc839470f94da413 0 FF 4 @@ -3481,10 +3481,10 @@ 0 2 - - + + 9 - hash_080103324e22df4d579128205db3058caa02e9 + hash_080103408442758bfcd410cc839470f94da413 0 FF 1 @@ -3500,10 +3500,10 @@ 0 3 - - + + 9 - hash_080103324e22df4d579128205db3058caa02e9 + hash_080103408442758bfcd410cc839470f94da413 0 FF 3 @@ -3519,18 +3519,18 @@ 0 4 - + - + Data Source [dolb_age] task_item_id - hash_00010314384929acc6cc784e8b20570caa21ef|hash_000103b8d0847a4b95fc51c0c16197f960c924|hash_000103e745e2ac97e2eb2871a476facd5238cb|hash_0001031de6dbc81d12f0bcb4d4747e281aaf69 - + hash_000103e08fe167f296acbc1db7266241d53a34|hash_0001035f83603316374f4bd4434ccd31bae8d8|hash_000103d199d070900084ef69e0e7e7b328857e|hash_0001034d0d1fd0e0cd44cf6a5274b989bb9f68 + - - + + Cloud: DigitalOcean Droplets - CPU @@ -3545,7 +3545,7 @@ on - + do_cpu_pct @@ -3558,7 +3558,7 @@ 600 0 - + @@ -3577,8 +3577,8 @@ - - + + Cloud: DigitalOcean Droplets - Bandwidth @@ -3593,7 +3593,7 @@ on - + do_bw_pub_in @@ -3606,8 +3606,8 @@ 600 0 - - + + do_bw_pub_out @@ -3620,8 +3620,8 @@ 600 0 - - + + do_bw_prv_in @@ -3634,8 +3634,8 @@ 600 0 - - + + do_bw_prv_out @@ -3648,7 +3648,7 @@ 600 0 - + @@ -3667,8 +3667,8 @@ - - + + Cloud: DigitalOcean Droplets - Load Average @@ -3683,7 +3683,7 @@ on - + do_load_1 @@ -3696,8 +3696,8 @@ 600 0 - - + + do_load_5 @@ -3710,8 +3710,8 @@ 600 0 - - + + do_load_15 @@ -3724,7 +3724,7 @@ 600 0 - + @@ -3743,8 +3743,8 @@ - - + + Cloud: DigitalOcean Droplets - Memory @@ -3759,7 +3759,7 @@ on - + do_mem_total @@ -3772,8 +3772,8 @@ 600 0 - - + + do_mem_avail @@ -3786,8 +3786,8 @@ 600 0 - - + + do_mem_free @@ -3800,8 +3800,8 @@ 600 0 - - + + do_mem_cached @@ -3814,7 +3814,7 @@ 600 0 - + @@ -3833,8 +3833,8 @@ - - + + Cloud: DigitalOcean Droplets - Collection Age @@ -3849,7 +3849,7 @@ on - + do_age @@ -3862,7 +3862,7 @@ 600 0 - + @@ -3881,8 +3881,8 @@ - - + + Cloud: DigitalOcean Load Balancers - Connections @@ -3897,7 +3897,7 @@ on - + dolb_conn_cur @@ -3910,8 +3910,8 @@ 600 0 - - + + dolb_conn_lim @@ -3924,7 +3924,7 @@ 600 0 - + @@ -3943,8 +3943,8 @@ - - + + Cloud: DigitalOcean Load Balancers - CPU @@ -3959,7 +3959,7 @@ on - + dolb_cpu_pct @@ -3972,7 +3972,7 @@ 600 0 - + @@ -3991,8 +3991,8 @@ - - + + Cloud: DigitalOcean Load Balancers - HTTP Requests @@ -4007,7 +4007,7 @@ on - + dolb_http_rps @@ -4020,7 +4020,7 @@ 600 0 - + @@ -4039,8 +4039,8 @@ - - + + Cloud: DigitalOcean Load Balancers - HTTP Responses @@ -4055,7 +4055,7 @@ on - + dolb_http_resp @@ -4068,7 +4068,7 @@ 600 0 - + @@ -4087,8 +4087,8 @@ - - + + Cloud: DigitalOcean Load Balancers - Throughput @@ -4103,7 +4103,7 @@ on - + dolb_http_Bps @@ -4116,8 +4116,8 @@ 600 0 - - + + dolb_tcp_Bps @@ -4130,8 +4130,8 @@ 600 0 - - + + dolb_udp_Bps @@ -4144,8 +4144,8 @@ 600 0 - - + + dolb_nlbtcp_Bps @@ -4158,8 +4158,8 @@ 600 0 - - + + dolb_nlbudp_Bps @@ -4172,7 +4172,7 @@ 600 0 - + @@ -4191,8 +4191,8 @@ - - + + Cloud: DigitalOcean Load Balancers - Health Checks @@ -4207,7 +4207,7 @@ on - + dolb_hc_status @@ -4220,7 +4220,7 @@ 600 0 - + @@ -4239,8 +4239,8 @@ - - + + Cloud: DigitalOcean Load Balancers - Downtime @@ -4255,7 +4255,7 @@ on - + dolb_downtime @@ -4268,7 +4268,7 @@ 600 0 - + @@ -4287,8 +4287,8 @@ - - + + Cloud: DigitalOcean Load Balancers - Response Time @@ -4303,7 +4303,7 @@ on - + dolb_resp_avg_s @@ -4316,8 +4316,8 @@ 600 0 - - + + dolb_resp_p95_s @@ -4330,7 +4330,7 @@ 600 0 - + @@ -4349,8 +4349,8 @@ - - + + Cloud: DigitalOcean Load Balancers - Droplet Connections @@ -4365,7 +4365,7 @@ on - + dolb_back_conn @@ -4378,8 +4378,8 @@ 600 0 - - + + dolb_queue @@ -4392,7 +4392,7 @@ 600 0 - + @@ -4411,8 +4411,8 @@ - - + + Cloud: DigitalOcean Load Balancers - Collection Age @@ -4427,7 +4427,7 @@ on - + dolb_age @@ -4440,7 +4440,7 @@ 600 0 - + @@ -4459,490 +4459,490 @@ - + Normal %8.2lf %s - + Cloud: DigitalOcean Droplets Cloud: DigitalOcean Droplets of the scope, read from the plugin cache. <path_cacti>/resource/script_server/cloud_do_droplet.xml hash_030103332111d8b54ac8ce939af87a7eac0c06 - - hash_0001033c320e02f1fa483a4d3411b6f44b9441 + + hash_000103306c148ee387a19ae392fe1f65674f03 CPU do_cpu_pct - hash_010103f66b0fa84e570fb1b7f91095a75b4b75 - hash_0801034386c404e78b9a77be5346a8dd3019b1 + hash_010103c91a85e3d15fe678dd76a9bf8ea22414 + hash_0801033c2c5c7bef9af3836c127a740622d809 - + title 1 |host_description| - |query_resourceName| - CPU - + - + name - hash_010103f66b0fa84e570fb1b7f91095a75b4b75 + hash_010103c91a85e3d15fe678dd76a9bf8ea22414 1 |host_description| - |query_resourceName| - CPU - + - - - hash_000103ff48ecb36a954a915b295d9a6231a0f7 + + + hash_0001032e6af03d878c26242f9cd77fd481f807 Bandwidth do_bw_pub_in - hash_0101030521a24d9a8dbc1348450aada426e5f4 - hash_08010315815af0359dda45dd27be828b7f888c + hash_010103bac7d8011b5bf6be49a5e978b447ef38 + hash_080103749c1c0bff50b3e5efd4de51d04adb69 do_bw_pub_out - hash_0101030521a24d9a8dbc1348450aada426e5f4 - hash_080103b4012a74aa9256874cce00f892db8d2e + hash_010103bac7d8011b5bf6be49a5e978b447ef38 + hash_080103bfb1c26e1a42b5e82649936055a62461 do_bw_prv_in - hash_0101030521a24d9a8dbc1348450aada426e5f4 - hash_080103438da5042072e6fde5889555b6358eec + hash_010103bac7d8011b5bf6be49a5e978b447ef38 + hash_0801030a8ddbb80268836e955ac18809a9ab8b do_bw_prv_out - hash_0101030521a24d9a8dbc1348450aada426e5f4 - hash_080103abdf5479f3988a8f52fb0071b6b0940a + hash_010103bac7d8011b5bf6be49a5e978b447ef38 + hash_080103330713ba80d37efbf00a3dc9c8ae40cf - + title 1 |host_description| - |query_resourceName| - Bandwidth - + - + name - hash_0101030521a24d9a8dbc1348450aada426e5f4 + hash_010103bac7d8011b5bf6be49a5e978b447ef38 1 |host_description| - |query_resourceName| - Bandwidth - + - - - hash_000103e394d7744e5c7aeb540ca545af244e08 + + + hash_000103d5a304d041270440ed530cffb79a7833 Load Average do_load_1 - hash_010103c9a451c6de97e773ee6f0e332b75dccf - hash_080103db82538a096d38ff3cb779b61835fa67 + hash_01010320fe3279ac49df7bb6c3f470ed42a808 + hash_0801037f5c3372f415b68c01bec323326a96a1 do_load_5 - hash_010103c9a451c6de97e773ee6f0e332b75dccf - hash_080103bf75b68252e387259dd57016b0edafa9 + hash_01010320fe3279ac49df7bb6c3f470ed42a808 + hash_080103451b06faafa516ef55eef1a3cecff70b do_load_15 - hash_010103c9a451c6de97e773ee6f0e332b75dccf - hash_0801037c44f770c69bb104a0881d60f8716cf7 + hash_01010320fe3279ac49df7bb6c3f470ed42a808 + hash_0801030182ca5e8103dbf8bedd2f2c3fdb51c3 - + title 1 |host_description| - |query_resourceName| - Load Average - + - + name - hash_010103c9a451c6de97e773ee6f0e332b75dccf + hash_01010320fe3279ac49df7bb6c3f470ed42a808 1 |host_description| - |query_resourceName| - Load Average - + - - - hash_000103e14038609a7c60402c99e4d0069bbf52 + + + hash_000103e3102d7839b70470e9511ca553b7b916 Memory do_mem_total - hash_010103eb5db0057ebedca97ca275ca6eefd633 - hash_080103071c9470d231ba7e986ce4eb3af669ba + hash_010103d0056196c9513b70ca4e848a1adb0167 + hash_0801036df5be35faa0d89df210629887cbd56e do_mem_avail - hash_010103eb5db0057ebedca97ca275ca6eefd633 - hash_080103c256012a2342382020f35099cbbdec0d + hash_010103d0056196c9513b70ca4e848a1adb0167 + hash_08010320d1c13571a6bce92070f77bb2b67cd5 do_mem_free - hash_010103eb5db0057ebedca97ca275ca6eefd633 - hash_08010310348b5e0f6d7dfc97406fa97b041a47 + hash_010103d0056196c9513b70ca4e848a1adb0167 + hash_0801037da676ae11671af4e15bacf2819ec7b8 do_mem_cached - hash_010103eb5db0057ebedca97ca275ca6eefd633 - hash_080103baab536c8205e475beaa2e152bbd7ad3 + hash_010103d0056196c9513b70ca4e848a1adb0167 + hash_080103f57286dad5daa773dcc475fe191e5b34 - + title 1 |host_description| - |query_resourceName| - Memory - + - + name - hash_010103eb5db0057ebedca97ca275ca6eefd633 + hash_010103d0056196c9513b70ca4e848a1adb0167 1 |host_description| - |query_resourceName| - Memory - + - - - hash_000103fa43a6253b3f766b23f7c0df2f66135c + + + hash_0001030cdd100a69ba4232cb3b297e58c1f6a1 Collection Age do_age - hash_0101037293273586ac5d132074656f5e14b2f4 - hash_080103ec1614dd14f68e78b8fa6a83107cf301 + hash_0101035689a2530ca2704b91324459a055c002 + hash_0801031a276645bb64ecf3200afd99ab80de7e - + title 1 |host_description| - |query_resourceName| - Collection Age - + - + name - hash_0101037293273586ac5d132074656f5e14b2f4 + hash_0101035689a2530ca2704b91324459a055c002 1 |host_description| - |query_resourceName| - Collection Age - + - + - - + + Cloud: DigitalOcean Load Balancers Cloud: DigitalOcean Load Balancers of the scope, read from the plugin cache. <path_cacti>/resource/script_server/cloud_do_load_balancer.xml hash_030103332111d8b54ac8ce939af87a7eac0c06 - - hash_0001039375e6a0ad69fdc73f619ef506cb7139 + + hash_00010397d3c3deca863c0db08b29fc04e61f0e Connections dolb_conn_cur - hash_0101035cca4c71f4a59c9eb4569b58cd444fdd - hash_080103af0dc885a37f1885baa3746e2efbaf94 + hash_010103959594fc216f97420e18f8aad6df7b35 + hash_08010356c4730492f7625f7fef993b58dd67a6 dolb_conn_lim - hash_0101035cca4c71f4a59c9eb4569b58cd444fdd - hash_08010328c03a47b34e3032f3c956549d6c608b + hash_010103959594fc216f97420e18f8aad6df7b35 + hash_080103cd4ed9243937fc1da5cf3b24db9e8c4f - + title 1 |host_description| - |query_resourceName| - Connections - + - + name - hash_0101035cca4c71f4a59c9eb4569b58cd444fdd + hash_010103959594fc216f97420e18f8aad6df7b35 1 |host_description| - |query_resourceName| - Connections - + - - - hash_000103fab3cae3a96221708d61fa359cf05921 + + + hash_000103a5e59e0c8c793f9fb0c976dda08635e3 CPU dolb_cpu_pct - hash_010103ce06abcd9fa6a7ebf63f383f2d8edbd9 - hash_080103b4bfa3d1771c2f5f6a521a49682f594f + hash_01010302cb4e5b180f6c5684f7f7bcb449ca38 + hash_080103b1297692bf7855828cc680acf8a0fe17 - + title 1 |host_description| - |query_resourceName| - CPU - + - + name - hash_010103ce06abcd9fa6a7ebf63f383f2d8edbd9 + hash_01010302cb4e5b180f6c5684f7f7bcb449ca38 1 |host_description| - |query_resourceName| - CPU - + - - - hash_0001032e56476c6f6acdcec6ac9ca457fd199c + + + hash_0001035a59ca8ac5baec59fe3437f6d15f5651 HTTP Requests dolb_http_rps - hash_01010306081918ccdd555e880bc1207ead22ad - hash_0801033554656861fc21f55f146b2fda7fb4c5 + hash_0101034e42f56aab563216960faa997071d587 + hash_0801034c8470f6ff72c7f3aedb5be0c0382280 - + title 1 |host_description| - |query_resourceName| - HTTP Requests - + - + name - hash_01010306081918ccdd555e880bc1207ead22ad + hash_0101034e42f56aab563216960faa997071d587 1 |host_description| - |query_resourceName| - HTTP Requests - + - - - hash_000103117fbc0ed1725f67af0955be2d77023c + + + hash_0001034805350075badb0f941a4c123a5a3764 HTTP Responses dolb_http_resp - hash_0101032cbedc3e9320e6d8701f8e1785187cb6 - hash_080103c837c84916127062033147fb69d430c1 + hash_0101037cada803cd7f42b6121ef99aded8ed7a + hash_080103e0db6738c617410a308f0b61966e4e85 - + title 1 |host_description| - |query_resourceName| - HTTP Responses - + - + name - hash_0101032cbedc3e9320e6d8701f8e1785187cb6 + hash_0101037cada803cd7f42b6121ef99aded8ed7a 1 |host_description| - |query_resourceName| - HTTP Responses - + - - - hash_0001037448d244f9720c5c1e79d6de3fc0d00b + + + hash_0001032f7b7718c9938f7b148c91a747e48e38 Throughput dolb_http_Bps - hash_010103baa66323f654dd84b9a6d924d6f50517 - hash_08010304d94f156e617662058f507fd17aa8dd + hash_010103cdaaaf87a7a9d6962362d53427dd6459 + hash_0801034b416d31b14a410b0d9fc267d6c673ea dolb_tcp_Bps - hash_010103baa66323f654dd84b9a6d924d6f50517 - hash_080103c0e4a6d447e5be1180d3db907aef281b + hash_010103cdaaaf87a7a9d6962362d53427dd6459 + hash_08010373ab165625ccf2e9c839f2547dd03751 dolb_udp_Bps - hash_010103baa66323f654dd84b9a6d924d6f50517 - hash_080103e9069fda9165ea96860ecf7b74964722 + hash_010103cdaaaf87a7a9d6962362d53427dd6459 + hash_0801032937d61b18729675c0df26e68b8f3250 dolb_nlbtcp_Bps - hash_010103baa66323f654dd84b9a6d924d6f50517 - hash_080103ad694cf8f6cc1a787c33f7ca0aa00fbd + hash_010103cdaaaf87a7a9d6962362d53427dd6459 + hash_0801039966c69c86b3a7f60497a61e978d93fa dolb_nlbudp_Bps - hash_010103baa66323f654dd84b9a6d924d6f50517 - hash_0801032a7fb385707dffed06f4fb4301d3cc3f + hash_010103cdaaaf87a7a9d6962362d53427dd6459 + hash_080103f83f7ed56ef9cb28643ecdeb13cf410a - + title 1 |host_description| - |query_resourceName| - Throughput - + - + name - hash_010103baa66323f654dd84b9a6d924d6f50517 + hash_010103cdaaaf87a7a9d6962362d53427dd6459 1 |host_description| - |query_resourceName| - Throughput - + - - - hash_000103625f54b70163fddc1bd0da93087bedef + + + hash_000103804329b0ffccafd02ae9f4eee64fd6f3 Health Checks dolb_hc_status - hash_01010354c9dc192706be516fb8e9ef5e754cc0 - hash_0801039dc83d3d932784e727329d5b2a2657fe + hash_0101034a1e87e7359d2ecd9e6a3ad46aabb4e8 + hash_0801039d3647952c70565cd8979e05bb534b32 - + title 1 |host_description| - |query_resourceName| - Health Checks - + - + name - hash_01010354c9dc192706be516fb8e9ef5e754cc0 + hash_0101034a1e87e7359d2ecd9e6a3ad46aabb4e8 1 |host_description| - |query_resourceName| - Health Checks - + - - - hash_00010325662a207edf1776a52a9f0deca2bad3 + + + hash_000103ced15a134aadffbcbd0602986c74c93b Downtime dolb_downtime - hash_010103abb42eea8f065fc7e6901ef94c74a677 - hash_080103c34f29ccdb91f4bf8080b9b1175eccd0 + hash_010103debef6ed19ede934046c5e500da3c8fa + hash_080103f46a542535d4633d92b8ad6afc00ac6f - + title 1 |host_description| - |query_resourceName| - Downtime - + - + name - hash_010103abb42eea8f065fc7e6901ef94c74a677 + hash_010103debef6ed19ede934046c5e500da3c8fa 1 |host_description| - |query_resourceName| - Downtime - + - - - hash_0001030271019d9650f4e9f18070044724b119 + + + hash_000103d74d4e6fe03b3a15453cd1409e3c5130 Response Time dolb_resp_avg_s - hash_0101038dbb1c7237736971c0f86ea5a4602b27 - hash_0801033e6006ed0f73462fd0257fabe92ecf4f + hash_010103b007d1c4647ead357cdd8dd2c8c94a94 + hash_080103e11379b894f9694d84cd2deb70643af5 dolb_resp_p95_s - hash_0101038dbb1c7237736971c0f86ea5a4602b27 - hash_080103c0070b529ad5d8cf9e2f7fe632642f59 + hash_010103b007d1c4647ead357cdd8dd2c8c94a94 + hash_0801031fd6548138c2c4f26a2c1f3edb22fff6 - + title 1 |host_description| - |query_resourceName| - Response Time - + - + name - hash_0101038dbb1c7237736971c0f86ea5a4602b27 + hash_010103b007d1c4647ead357cdd8dd2c8c94a94 1 |host_description| - |query_resourceName| - Response Time - + - - - hash_0001036d050a9d8044862b803530a684f83503 + + + hash_0001035e99a47ebc655f6f4256fe5611c965bb Droplet Connections dolb_back_conn - hash_0101039f4959feddd4ff57cde4bd44d1e2f0e2 - hash_0801038341453059c4388c97b6d2974d80505f + hash_010103190300176cadde43773ffe5ab3790cb9 + hash_080103544c1e62c9ec4d933b5c0b80d48adfd6 dolb_queue - hash_0101039f4959feddd4ff57cde4bd44d1e2f0e2 - hash_0801037db2d786f1323bbd4406f93c3f16b39a + hash_010103190300176cadde43773ffe5ab3790cb9 + hash_080103bd0a12aeba3deda34eaed14aa48cd3b3 - + title 1 |host_description| - |query_resourceName| - Droplet Connections - + - + name - hash_0101039f4959feddd4ff57cde4bd44d1e2f0e2 + hash_010103190300176cadde43773ffe5ab3790cb9 1 |host_description| - |query_resourceName| - Droplet Connections - + - - - hash_0001033a1a600f25b30248b90559a3df51179b + + + hash_000103b5a858b0599afda7f5b64f7bdb12c71c Collection Age dolb_age - hash_0101030800159906f92b6765016dca68baa916 - hash_080103324e22df4d579128205db3058caa02e9 + hash_010103324cea8009cee203f60b85b7e5055a9e + hash_080103408442758bfcd410cc839470f94da413 - + title 1 |host_description| - |query_resourceName| - Collection Age - + - + name - hash_0101030800159906f92b6765016dca68baa916 + hash_010103324cea8009cee203f60b85b7e5055a9e 1 |host_description| - |query_resourceName| - Collection Age - + - + - + diff --git a/tests/bin/generate-templates.php b/tests/bin/generate-templates.php index 0e6befe..bf3d8a0 100644 --- a/tests/bin/generate-templates.php +++ b/tests/bin/generate-templates.php @@ -30,7 +30,7 @@ * * The layout follows Cacti's own export (lib/export.php), field for field, * so the importer reads it as it reads any shipped package. Output is - * reproducible: every hash is md5('plugin_cloud/' . key) over a fixed key. + * reproducible: every hash comes from TemplateRepository::hash() over a fixed key. * The template unit test runs these functions and compares their output * with the shipped files. * @@ -99,12 +99,12 @@ * The XML element name or reference for one object, as get_hash_version() * builds it. */ -function cloud_tpl_ref(string $type, string $md5): string { - return 'hash_' . CLOUD_TPL_TYPES[$type] . CLOUD_TPL_VERSION . $md5; +function cloud_tpl_ref(string $type, string $id): string { + return 'hash_' . CLOUD_TPL_TYPES[$type] . CLOUD_TPL_VERSION . $id; } function cloud_tpl_own(string $type, string $key): string { - return cloud_tpl_ref($type, md5('plugin_cloud/' . $key)); + return cloud_tpl_ref($type, \Somethingwithproof\Cloud\TemplateRepository::hash($key)); } /** @@ -332,7 +332,7 @@ function cloud_tpl_graph_template(string $key, array $graph): array { $items[cloud_tpl_own('graph_template_item', $item)] = cloud_tpl_graph_item($task, $row, $sequence); /* The exporter writes input items with the graph template type - * code, and the importer reads only the md5, so an export of the + * code, and the importer reads only the 32-digit id, so an export of the * imported template matches this file. */ $used[] = cloud_tpl_own('graph_template', $item); }