Skip to content

Commit

Permalink
Don't speak of Icinga (DB) Redis
Browse files Browse the repository at this point in the history
The use of registered trademarks in this way is not allowed.
  • Loading branch information
lippserd committed Apr 11, 2024
1 parent 358a7d0 commit b9402c6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions library/Icingadb/ProvidedHook/ApplicationState.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function collectMessages()
$this->addError(
'icingadb/redis-down',
$downSince,
sprintf(t("Can't connect to Icinga Redis: %s"), $e->getMessage())
sprintf(t("Can't connect to Redis: %s"), $e->getMessage())
);

return;
Expand Down Expand Up @@ -89,7 +89,7 @@ public function collectMessages()
$this->addError(
'icingadb/redis-outdated',
$lastIcingaHeartbeat,
t('Icinga Redis is outdated. Make sure Icinga 2 is running and connected to Redis.')
t('Redis is outdated. Make sure Icinga 2 is running and connected to Redis.')
);

break;
Expand Down
10 changes: 5 additions & 5 deletions library/Icingadb/ProvidedHook/RedisHealth.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class RedisHealth extends HealthHook

public function getName(): string
{
return 'Icinga Redis';
return 'Redis';
}

public function checkHealth()
Expand All @@ -32,7 +32,7 @@ public function checkHealth()
if ($instance === null) {
$this->setState(self::STATE_UNKNOWN);
$this->setMessage(t(
'Can\'t check Icinga Redis: Icinga DB is not running or not writing into the database'
'Can\'t check Redis: Icinga DB is not running or not writing into the database'
. ' (make sure the icinga feature "icingadb" is enabled)'
));

Expand All @@ -42,14 +42,14 @@ public function checkHealth()
$outdatedDbHeartbeat = $instance->heartbeat->getTimestamp() < time() - 60;
if (! $outdatedDbHeartbeat || $instance->heartbeat->getTimestamp() <= $lastIcingaHeartbeat) {
$this->setState(self::STATE_OK);
$this->setMessage(t('Icinga Redis available and up to date.'));
$this->setMessage(t('Redis available and up to date.'));
} elseif ($instance->heartbeat->getTimestamp() > $lastIcingaHeartbeat) {
$this->setState(self::STATE_CRITICAL);
$this->setMessage(t('Icinga Redis outdated. Make sure Icinga 2 is running and connected to Redis.'));
$this->setMessage(t('Redis outdated. Make sure Icinga 2 is running and connected to Redis.'));
}
} catch (Exception $e) {
$this->setState(self::STATE_CRITICAL);
$this->setMessage(sprintf(t("Can't connect to Icinga Redis: %s"), $e->getMessage()));
$this->setMessage(sprintf(t("Can't connect to Redis: %s"), $e->getMessage()));
}
}
}
4 changes: 2 additions & 2 deletions library/Icingadb/Setup/RedisPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class RedisPage extends Form
public function init()
{
$this->setName('setup_icingadb_redis');
$this->setTitle(t('Icinga DB Redis'));
$this->setTitle(t('Redis'));
$this->addDescription(t(
'Please fill out the connection details to access the Icinga DB Redis.'
'Please fill out the connection details to access the Redis server.'
));
$this->setValidatePartial(true);
}
Expand Down
4 changes: 2 additions & 2 deletions library/Icingadb/Setup/RedisStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function getSummary()
$topic = new HtmlElement('div', Attributes::create(['class' => 'topic']));
$topic->addHtml(new HtmlElement('p', null, Text::create(mt(
'icingadb',
'The Icinga DB Redis will be accessed using the following connection details:'
'Redis will be accessed using the following connection details:'
))));

$primaryOptions = new Table();
Expand Down Expand Up @@ -178,7 +178,7 @@ public function getSummary()

$summary = new HtmlDocument();
$summary->addHtml(
new HtmlElement('h2', null, Text::create(mt('icingadb', 'Icinga DB Redis'))),
new HtmlElement('h2', null, Text::create(mt('icingadb', 'Redis'))),
$topic
);

Expand Down
2 changes: 1 addition & 1 deletion library/Icingadb/Widget/ItemList/StateList.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected function assemble(): void

if ($this->data instanceof VolatileStateResults && $this->data->isRedisUnavailable()) {
$this->prependWrapper((new HtmlDocument())->addHtml(new Notice(
t('Icinga Redis is currently unavailable. The shown information might be outdated.')
t('Redis is currently unavailable. The shown information might be outdated.')
)));
}
}
Expand Down

0 comments on commit b9402c6

Please sign in to comment.