* This commit gets m3 back to being able to compile. It very likely doesn't actually work yet though.

* Added the variables table to the core SQL schema.
* Added Databsae->insert_or_update_variables() and ->read_variable().

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 8 years ago
parent 66a984adbc
commit ae58dd6f12
  1. 5
      AN/Tools.pm
  2. 65
      AN/Tools.sql
  3. 78
      AN/Tools/Alert.pm
  4. 2
      AN/Tools/Convert.pm
  5. 695
      AN/Tools/Database.pm
  6. 3
      AN/Tools/Get.pm
  7. 14
      AN/Tools/Storage.pm
  8. 9
      AN/Tools/System.pm
  9. 40
      AN/an-tools.xml

@ -560,6 +560,11 @@ sub _set_defaults
my ($an) = shift; my ($an) = shift;
$an->data->{defaults} = { $an->data->{defaults} = {
database => {
locking => {
reap_age => 300,
}
},
language => { language => {
# Default language for all output shown to a user. # Default language for all output shown to a user.
output => 'en_CA', output => 'en_CA',

@ -177,6 +177,71 @@ CREATE TRIGGER trigger_alerts
FOR EACH ROW EXECUTE PROCEDURE history_alerts(); FOR EACH ROW EXECUTE PROCEDURE history_alerts();
-- This holds user-configurable variable. These values override defaults but NOT configuration files.
CREATE TABLE variables (
variable_uuid uuid not null primary key, --
variable_name text not null, -- This is the 'x::y::z' style variable name.
variable_value text, -- It is up to the software to sanity check variable values before they are stored
variable_default text, -- This acts as a reference for the user should they want to roll-back changes.
variable_description text, -- This is a string key that describes this variable's use.
variable_section text, -- This is a free-form field that is used when displaying the various entries to a user. This allows for the various variables to be grouped into sections.
variable_source_uuid text, -- Optional; Marks the variable as belonging to a specific X_uuid, where 'X' is a table name set in 'variable_source_table'
variable_source_table text, -- Optional; Marks the database table corresponding to the 'variable_source_uuid' value.
modified_date timestamp with time zone not null
);
ALTER TABLE variables OWNER TO #!variable!user!#;
CREATE TABLE history.variables (
history_id bigserial,
variable_uuid uuid,
variable_name text,
variable_value text,
variable_default text,
variable_description text,
variable_section text,
variable_source_uuid text,
variable_source_table text,
modified_date timestamp with time zone not null
);
ALTER TABLE history.variables OWNER TO #!variable!user!#;
CREATE FUNCTION history_variables() RETURNS trigger
AS $$
DECLARE
history_variables RECORD;
BEGIN
SELECT INTO history_variables * FROM variables WHERE variable_uuid = new.variable_uuid;
INSERT INTO history.variables
(variable_uuid,
variable_name,
variable_value,
variable_default,
variable_description,
variable_section,
variable_source_uuid,
variable_source_table,
modified_date)
VALUES
(history_variables.variable_uuid,
history_variables.variable_name,
history_variables.variable_value,
history_variables.variable_default,
history_variables.variable_description,
history_variables.variable_section,
history_variables.variable_source_uuid,
history_variables.variable_source_table,
history_variables.modified_date);
RETURN NULL;
END;
$$
LANGUAGE plpgsql;
ALTER FUNCTION history_variables() OWNER TO #!variable!user!#;
CREATE TRIGGER trigger_variables
AFTER INSERT OR UPDATE ON variables
FOR EACH ROW EXECUTE PROCEDURE history_variables();
-- ------------------------------------------------------------------------------------------------------- -- -- ------------------------------------------------------------------------------------------------------- --
-- These are special tables with no history or tracking UUIDs that simply record transient information. -- -- These are special tables with no history or tracking UUIDs that simply record transient information. --
-- ------------------------------------------------------------------------------------------------------- -- -- ------------------------------------------------------------------------------------------------------- --

@ -132,7 +132,7 @@ sub check_alert_sent
if (not $name) if (not $name)
{ {
# Nope # Nope
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0094"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Alert->check_alert_sent()", parameter => "name" }});
return(undef); return(undef);
} }
@ -140,7 +140,7 @@ sub check_alert_sent
if (not $record_locator) if (not $record_locator)
{ {
# Nope # Nope
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0095"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Alert->check_alert_sent()", parameter => "record_locator" }});
return(undef); return(undef);
} }
@ -148,7 +148,7 @@ sub check_alert_sent
if (not $set_by) if (not $set_by)
{ {
# Nope # Nope
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0096"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Alert->check_alert_sent()", parameter => "set_by" }});
return(undef); return(undef);
} }
@ -171,11 +171,11 @@ FROM
WHERE WHERE
alert_sent_host_uuid = ".$an->data->{sys}{use_db_fh}->quote($an->data->{sys}{host_uuid})." alert_sent_host_uuid = ".$an->data->{sys}{use_db_fh}->quote($an->data->{sys}{host_uuid})."
AND AND
alert_set_by = ".$an->data->{sys}{use_db_fh}->quote($alert_set_by)." alert_set_by = ".$an->data->{sys}{use_db_fh}->quote($set_by)."
AND AND
alert_record_locator = ".$an->data->{sys}{use_db_fh}->quote($alert_record_locator)." alert_record_locator = ".$an->data->{sys}{use_db_fh}->quote($record_locator)."
AND AND
alert_name = ".$an->data->{sys}{use_db_fh}->quote($alert_name)." alert_name = ".$an->data->{sys}{use_db_fh}->quote($name)."
;"; ;";
$an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { query => $query }}); $an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { query => $query }});
@ -213,9 +213,9 @@ WHERE
# Too early, we can't set an alert. # Too early, we can't set an alert.
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "alert", key => "log_0098", variables => { $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "alert", key => "log_0098", variables => {
type => $type, type => $type,
alert_set_by => $alert_set_by, alert_set_by => $set_by,
alert_record_locator => $alert_record_locator, alert_record_locator => $record_locator,
alert_name => $alert_name, alert_name => $name,
modified_date => $modified_date, modified_date => $modified_date,
}}); }});
return(undef); return(undef);
@ -239,9 +239,9 @@ INSERT INTO
modified_date modified_date
) VALUES ( ) VALUES (
".$an->data->{sys}{use_db_fh}->quote($an->data->{sys}{host_uuid}).", ".$an->data->{sys}{use_db_fh}->quote($an->data->{sys}{host_uuid}).",
".$an->data->{sys}{use_db_fh}->quote($alert_set_by).", ".$an->data->{sys}{use_db_fh}->quote($set_by).",
".$an->data->{sys}{use_db_fh}->quote($alert_record_locator).", ".$an->data->{sys}{use_db_fh}->quote($record_locator).",
".$an->data->{sys}{use_db_fh}->quote($alert_name).", ".$an->data->{sys}{use_db_fh}->quote($name).",
".$an->data->{sys}{use_db_fh}->quote($an->data->{sys}{db_timestamp})." ".$an->data->{sys}{use_db_fh}->quote($an->data->{sys}{db_timestamp})."
); );
"; ";
@ -261,17 +261,17 @@ DELETE FROM
WHERE WHERE
alert_sent_host_uuid = ".$an->data->{sys}{use_db_fh}->quote($an->data->{sys}{host_uuid})." alert_sent_host_uuid = ".$an->data->{sys}{use_db_fh}->quote($an->data->{sys}{host_uuid})."
AND AND
alert_set_by = ".$an->data->{sys}{use_db_fh}->quote($alert_set_by)." alert_set_by = ".$an->data->{sys}{use_db_fh}->quote($set_by)."
AND AND
alert_record_locator = ".$an->data->{sys}{use_db_fh}->quote($alert_record_locator)." alert_record_locator = ".$an->data->{sys}{use_db_fh}->quote($record_locator)."
AND AND
alert_name = ".$an->data->{sys}{use_db_fh}->quote($alert_name)." alert_name = ".$an->data->{sys}{use_db_fh}->quote($name)."
;"; ;";
$an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { $an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
query => $query, query => $query,
set => $set, set => $set,
}}); }});
$an->DB->do_db_write({query => $query, source => $THIS_FILE, line => __LINE__}); $an->Database->write({query => $query, source => $THIS_FILE, line => __LINE__});
} }
$an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { set => $set }}); $an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { set => $set }});
@ -312,12 +312,12 @@ sub register_alert
if (not $set_by) if (not $set_by)
{ {
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0099"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Alert->register_alert()", parameter => "set_by" }});
return(undef); return(undef);
} }
if (not $message_key) if (not $message_key)
{ {
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0100"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Alert->register_alert()", parameter => "message_key" }});
return(undef); return(undef);
} }
if (($header) && (not $title_key)) if (($header) && (not $title_key))
@ -327,26 +327,24 @@ sub register_alert
} }
# zero-pad sort numbers so that they sort properly. # zero-pad sort numbers so that they sort properly.
$alert_sort = sprintf("%04d", $alert_sort); $sort = sprintf("%04d", $sort);
$an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { alert_sort => $alert_sort }}); $an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { alert_sort => $sort }});
# Convert the hash of title variables and message variables into '!!x!y!!,!!a!b!!,...' strings. # Convert the hash of title variables and message variables into '!!x!y!!,!!a!b!!,...' strings.
my $title_variables = ""; if (ref($title_variables) eq "HASH")
if (ref($alert_title_variables) eq "HASH")
{ {
foreach my $key (sort {$a cmp $b} keys %{$alert_title_variables}) foreach my $key (sort {$a cmp $b} keys %{$title_variables})
{ {
$alert_title_variables->{$key} = "--" if not defined $alert_title_variables->{$key}; $title_variables->{$key} = "--" if not defined $title_variables->{$key};
$title_variables .= "!!$key!".$alert_title_variables->{$key}."!!,"; $title_variables .= "!!$key!".$title_variables->{$key}."!!,";
} }
} }
my $message_variables = ""; if (ref($message_variables) eq "HASH")
if (ref($alert_message_variables) eq "HASH")
{ {
foreach my $key (sort {$a cmp $b} keys %{$alert_message_variables}) foreach my $key (sort {$a cmp $b} keys %{$message_variables})
{ {
$alert_message_variables->{$key} = "--" if not defined $alert_message_variables->{$key}; $message_variables->{$key} = "--" if not defined $message_variables->{$key};
$message_variables .= "!!$key!".$alert_message_variables->{$key}."!!,"; $message_variables .= "!!$key!".$message_variables->{$key}."!!,";
} }
} }
@ -392,16 +390,16 @@ sub register_alert
} }
# Now get the numeric value of this alert and return if it is higher. # Now get the numeric value of this alert and return if it is higher.
my $this_level = $an->Alert->convert_level_name_to_number({level => $alert_level}); my $this_level = $an->Alert->convert_level_name_to_number({level => $level});
$an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { $an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
alert_level => $alert_level, alert_level => $level,
this_level => $this_level, this_level => $this_level,
lowest_log_level => $lowest_log_level, lowest_log_level => $lowest_log_level,
}}); }});
if ($this_level > $lowest_log_level) if ($this_level > $lowest_log_level)
{ {
# Return. # Return.
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, key => "log_0102", variables => { message_key => $alert_message_key }}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, key => "log_0102", variables => { message_key => $message_key }});
return(0); return(0);
} }
@ -424,19 +422,19 @@ INSERT INTO
) VALUES ( ) VALUES (
".$an->data->{sys}{use_db_fh}->quote($an->Get->uuid()).", ".$an->data->{sys}{use_db_fh}->quote($an->Get->uuid()).",
".$an->data->{sys}{use_db_fh}->quote($an->data->{sys}{host_uuid}).", ".$an->data->{sys}{use_db_fh}->quote($an->data->{sys}{host_uuid}).",
".$an->data->{sys}{use_db_fh}->quote($alert_set_by).", ".$an->data->{sys}{use_db_fh}->quote($set_by).",
".$an->data->{sys}{use_db_fh}->quote($alert_level).", ".$an->data->{sys}{use_db_fh}->quote($level).",
".$an->data->{sys}{use_db_fh}->quote($alert_title_key).", ".$an->data->{sys}{use_db_fh}->quote($title_key).",
".$an->data->{sys}{use_db_fh}->quote($title_variables).", ".$an->data->{sys}{use_db_fh}->quote($title_variables).",
".$an->data->{sys}{use_db_fh}->quote($alert_message_key).", ".$an->data->{sys}{use_db_fh}->quote($message_key).",
".$an->data->{sys}{use_db_fh}->quote($message_variables).", ".$an->data->{sys}{use_db_fh}->quote($message_variables).",
".$an->data->{sys}{use_db_fh}->quote($alert_sort).", ".$an->data->{sys}{use_db_fh}->quote($sort).",
".$an->data->{sys}{use_db_fh}->quote($alert_header).", ".$an->data->{sys}{use_db_fh}->quote($header).",
".$an->data->{sys}{use_db_fh}->quote($an->data->{sys}{db_timestamp})." ".$an->data->{sys}{use_db_fh}->quote($an->data->{sys}{db_timestamp})."
); );
"; ";
$an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { query => $query }}); $an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { query => $query }});
$an->DB->do_db_write({query => $query, source => $THIS_FILE, line => __LINE__}); $an->Database->write({query => $query, source => $THIS_FILE, line => __LINE__});
return(0); return(0);
} }

@ -210,7 +210,7 @@ sub hostname_to_ip
if (not $hostname) if (not $hostname)
{ {
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0059"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Convert->hostname_to_ip()", parameter => "hostnmae" }});
return($ip); return($ip);
} }

File diff suppressed because it is too large Load Diff

@ -402,7 +402,7 @@ sub users_home
if ($user eq "") if ($user eq "")
{ {
# No user? No bueno... # No user? No bueno...
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0060"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Get->users_home()", parameter => "user" }});
return($home_directory); return($home_directory);
} }
@ -418,7 +418,6 @@ sub users_home
last; last;
} }
} }
close $file_handle;
# Do I have the a user's $HOME now? # Do I have the a user's $HOME now?
if (not $home_directory) if (not $home_directory)

@ -114,13 +114,13 @@ sub change_mode
if (not $target) if (not $target)
{ {
# No target... # No target...
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "alert", key => "log_0036"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Storage->change_mode()", parameter => "target" }});
$error = 1; $error = 1;
} }
if (not $mode) if (not $mode)
{ {
# No mode... # No mode...
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "alert", key => "log_0037"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Storage->change_mode()", parameter => "mode" }});
$error = 1; $error = 1;
} }
elsif (($mode !~ /^\d\d\d$/) && ($mode !~ /^\d\d\d\d$/)) elsif (($mode !~ /^\d\d\d$/) && ($mode !~ /^\d\d\d\d$/))
@ -199,7 +199,7 @@ sub change_owner
if (not $target) if (not $target)
{ {
# No target... # No target...
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "alert", key => "log_0039"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Storage->change_owner()", parameter => "target" }});
$error = 1; $error = 1;
} }
if (not -e $target) if (not -e $target)
@ -284,7 +284,7 @@ sub copy_file
if (not $source) if (not $source)
{ {
# No source passed. # No source passed.
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0044"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Storage->copy_file()", parameter => "source" }});
return(1); return(1);
} }
elsif (not -e $source) elsif (not -e $source)
@ -295,7 +295,7 @@ sub copy_file
if (not $target) if (not $target)
{ {
# No target passed. # No target passed.
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0045"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Storage->copy_file()", parameter => "target" }});
return(2); return(2);
} }
@ -650,7 +650,7 @@ sub read_file
if (not $file) if (not $file)
{ {
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Storage->read_file()", parameter => "file" }});
return(undef); return(undef);
} }
elsif (not -e $file) elsif (not -e $file)
@ -708,7 +708,7 @@ sub read_mode
if (not $target) if (not $target)
{ {
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0050"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Storage->read_mode()", parameter => "target" }});
return(1); return(1);
} }

@ -348,7 +348,7 @@ sub ping
else else
{ {
### Local calls ### Local calls
$output = $an->System->call({shell_call => $an->data->{path}{exe}{systemctl}." start ".$say_daemon."; ".$an->data->{path}{exe}{'echo'}." return_code:\$?"}); $output = $an->System->call({shell_call => $shell_call});
$an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { output => $output }}); $an->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { output => $output }});
} }
@ -410,6 +410,7 @@ sub read_ssh_config
my $an = $self->parent; my $an = $self->parent;
# This will hold the raw contents of the file. # This will hold the raw contents of the file.
my $this_host = "";
$an->data->{raw}{ssh_config} = $an->Storage->read_file({file => $an->data->{path}{configs}{ssh_config}}); $an->data->{raw}{ssh_config} = $an->Storage->read_file({file => $an->data->{path}{configs}{ssh_config}});
foreach my $line (split/\n/, $an->data->{raw}{ssh_config}) foreach my $line (split/\n/, $an->data->{raw}{ssh_config})
{ {
@ -545,18 +546,18 @@ sub remote_call
if (not $shell_call) if (not $shell_call)
{ {
# No shell call # No shell call
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0055"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Systeme->remote_call()", parameter => "shell_call" }});
return(undef); return(undef);
} }
if (not $target) if (not $target)
{ {
# No target # No target
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0056"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Systeme->remote_call()", parameter => "target" }});
return(undef); return(undef);
} }
if (not $user) if (not $user)
{ {
$an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0057"}); $an->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0020", variables => { method => "Systeme->remote_call()", parameter => "user" }});
return(undef); return(undef);
} }

@ -61,7 +61,7 @@ It also has replacement variables: [#!variable!first!#] and [#!variable!second!#
<key name="log_0017">Output: [#!variable!line!#].</key> <key name="log_0017">Output: [#!variable!line!#].</key>
<key name="log_0018">About to open the directory: [#!variable!directory!#]</key> <key name="log_0018">About to open the directory: [#!variable!directory!#]</key>
<key name="log_0019">Variables:</key> <key name="log_0019">Variables:</key>
<key name="log_0020"><![CDATA[[ Error ] - The method Storage->read_file() was called without a 'file' parameter, or the parameter was empty.]]></key> <key name="log_0020"><![CDATA[[ Error ] - The method: [#!variable!method!#] was called but the: [#!variable!parameter!#] parameter was not passed or it is empty.]]></key>
<key name="log_0021"><![CDATA[[ Error ] - The method Storage->read_file() was asked to read the file: [#!variable!file!#], but that file does not exist.]]></key> <key name="log_0021"><![CDATA[[ Error ] - The method Storage->read_file() was asked to read the file: [#!variable!file!#], but that file does not exist.]]></key>
<key name="log_0022"><![CDATA[[ Error ] - The method Storage->read_file() was asked to read the file: [#!variable!file!#] which exists but can't be read.]]></key> <key name="log_0022"><![CDATA[[ Error ] - The method Storage->read_file() was asked to read the file: [#!variable!file!#] which exists but can't be read.]]></key>
<key name="log_0023">Reading: [#!variable!line!#].</key> <key name="log_0023">Reading: [#!variable!line!#].</key>
@ -77,21 +77,21 @@ It also has replacement variables: [#!variable!first!#] and [#!variable!second!#
<key name="log_0033"><![CDATA[[ Warning ] - Words->read()' asked to read: [#!variable!file!#] which was not found.]]></key> <key name="log_0033"><![CDATA[[ Warning ] - Words->read()' asked to read: [#!variable!file!#] which was not found.]]></key>
<key name="log_0034"><![CDATA[[ Warning ] - AN::Tools::Words->read()' asked to read: [#!variable!file!#] which was not readable by: [#!variable!user!#] (uid/euid: [#!variable!uid!#]).]]></key> <key name="log_0034"><![CDATA[[ Warning ] - AN::Tools::Words->read()' asked to read: [#!variable!file!#] which was not readable by: [#!variable!user!#] (uid/euid: [#!variable!uid!#]).]]></key>
<key name="log_0035"><![CDATA[[ Warning ] - The config file: [#!variable!file!#] appears to have a malformed line: [#!variable!count!#:#!variable!line!#].]]></key> <key name="log_0035"><![CDATA[[ Warning ] - The config file: [#!variable!file!#] appears to have a malformed line: [#!variable!count!#:#!variable!line!#].]]></key>
<key name="log_0036"><![CDATA[[ Error ] - The method Storage->change_mode() was called without a 'target' parameter, or the parameter was empty.]]></key> <key name="log_0036"><![CDATA[[ Error ] - The method Database->read_variable() was called but both the 'variable_name' and 'variable_uuid' parameters were not passed or both were empty.]]></key>
<key name="log_0037"><![CDATA[[ Error ] - The method Storage->change_mode() was called without a 'mode' parameter, or the parameter was empty.]]></key> <key name="log_0037"><![CDATA[[ Error ] - The method Database->insert_or_update_variables() method was called but both the 'variable_name' and 'variable_uuid' parameters were not passed or both were empty.]]></key>
<key name="log_0038"><![CDATA[[ Error ] - The method Storage->change_mode() was called without an invalid 'mode' parameter. It should have been three or four digits, but: [#!variable!mode!#] was passed.]]></key> <key name="log_0038"><![CDATA[[ Error ] - The method Storage->change_mode() was called without an invalid 'mode' parameter. It should have been three or four digits, but: [#!variable!mode!#] was passed.]]></key>
<key name="log_0039"><![CDATA[[ Error ] - The method Storage->change_owner() was called without a 'target' parameter, or the parameter was empty.]]></key> <key name="log_0039">The host: [#!variable!host!#] has released its database lock.</key>
<key name="log_0040"><![CDATA[[ Error ] - The method Storage->write_file() was asked to write the file: [#!variable!file!#] but it already exists and 'overwrite' was not set. Aborting.]]></key> <key name="log_0040"><![CDATA[[ Error ] - The method Storage->write_file() was asked to write the file: [#!variable!file!#] but it already exists and 'overwrite' was not set. Aborting.]]></key>
<key name="log_0041"><![CDATA[[ Error ] - The method Storage->write_file() was asked to write the file: [#!variable!file!#] but it is not a full path. Aborting.]]></key> <key name="log_0041"><![CDATA[[ Error ] - The method Storage->write_file() was asked to write the file: [#!variable!file!#] but it is not a full path. Aborting.]]></key>
<key name="log_0042"><![CDATA[[ Error ] - The method Words->string() was asked to process the string: [#!variable!string!#] which has insertion variables, but nothing was passed to the 'variables' parameter.]]></key> <key name="log_0042"><![CDATA[[ Error ] - The method Words->string() was asked to process the string: [#!variable!string!#] which has insertion variables, but nothing was passed to the 'variables' parameter.]]></key>
<key name="log_0043"><![CDATA[[ Error ] - The method System->call() was called but 'shell_call' was not passed or was empty.]]></key> <key name="log_0043"><![CDATA[[ Error ] - The method System->call() was called but 'shell_call' was not passed or was empty.]]></key>
<key name="log_0044"><![CDATA[[ Error ] - The method Storage->copy_file() was called but 'source' was not passed or was empty.]]></key> <key name="log_0044">The host: [#!variable!host!#] has renewed its database lock.</key>
<key name="log_0045"><![CDATA[[ Error ] - The method Storage->copy_file() was called but 'target' was not passed or was empty.]]></key> <key name="log_0045">The host: [#!variable!host!#] is requesting a database lock.</key>
<key name="log_0046"><![CDATA[[ Error ] - The method Storage->copy_file() was asked to copy: [#!variable!source!#] to: [#!variable!target!#], but the target already exists and 'overwrite' wasn't specified, so aborting.]]></key> <key name="log_0046"><![CDATA[[ Error ] - The method Storage->copy_file() was asked to copy: [#!variable!source!#] to: [#!variable!target!#], but the target already exists and 'overwrite' wasn't specified, so aborting.]]></key>
<key name="log_0047"><![CDATA[[ Error ] - The method Log->level() was passed an invalid log level: [#!variable!set!#]. Only '0', '1', '2', '3' or '4' are valid.]]></key> <key name="log_0047"><![CDATA[[ Error ] - The method Log->level() was passed an invalid log level: [#!variable!set!#]. Only '0', '1', '2', '3' or '4' are valid.]]></key>
<key name="log_0048"><![CDATA[[ Warning ] - Testing of AN::Tools is beginning. This will generate warnings and alerts and are not a concern.]]></key> <key name="log_0048"><![CDATA[[ Warning ] - Testing of AN::Tools is beginning. This will generate warnings and alerts and are not a concern.]]></key>
<key name="log_0049"><![CDATA[[ Warning ] - Testing of AN::Tools is complete.]]></key> <key name="log_0049"><![CDATA[[ Warning ] - Testing of AN::Tools is complete.]]></key>
<key name="log_0050"><![CDATA[[ Error ] - The method Storage->read_mode() was called without a 'target' parameter, or the parameter was empty.]]></key> <key name="log_0050">#!free!#</key>
<key name="log_0051"><![CDATA[[ Error ] - The method Storage->change_owner() was asked to change the ownership of: [#!variable!target!#] which doesn't exist.]]></key> <key name="log_0051"><![CDATA[[ Error ] - The method Storage->change_owner() was asked to change the ownership of: [#!variable!target!#] which doesn't exist.]]></key>
<key name="log_0052"><![CDATA[[ Error ] - The method Storage->copy_file() was called but the source file: [#!variable!source!#] doesn't exist.]]></key> <key name="log_0052"><![CDATA[[ Error ] - The method Storage->copy_file() was called but the source file: [#!variable!source!#] doesn't exist.]]></key>
<key name="log_0053"><![CDATA[[ Error ] - The 'Database->connect()' method tried to connect to the same database twice: [#!variable!target!#].]]></key> <key name="log_0053"><![CDATA[[ Error ] - The 'Database->connect()' method tried to connect to the same database twice: [#!variable!target!#].]]></key>
@ -105,12 +105,12 @@ Connecting to Database with configuration ID: [#!variable!id!#]
- user: ............ [#!variable!user!#] - user: ............ [#!variable!user!#]
- password: ........ [#!variable!password!#] - password: ........ [#!variable!password!#]
</key> </key>
<key name="log_0055"><![CDATA[[ Error ] - The method System->remote_call() was called but 'shell_call' was not passed or was empty.]]></key> <key name="log_0055">#!free!#</key>
<key name="log_0056"><![CDATA[[ Error ] - The method System->remote_call() was called but 'target' was not passed or was empty.]]></key> <key name="log_0056">#!free!#</key>
<key name="log_0057"><![CDATA[[ Error ] - The method System->remote_call() was called but 'user' was not passed or was empty.]]></key> <key name="log_0057">#!free!#</key>
<key name="log_0058"><![CDATA[[ Error ] - The method System->remote_call() was called but the port: [#!variable!port!#] is invalid. It must be a digit between '1' and '65535'.]]></key> <key name="log_0058"><![CDATA[[ Error ] - The method System->remote_call() was called but the port: [#!variable!port!#] is invalid. It must be a digit between '1' and '65535'.]]></key>
<key name="log_0059"><![CDATA[[ Error ] - The method Convert->hostname_to_ip() was called but 'hostname' was not passed or was empty.]]></key> <key name="log_0059">#!free!#</key>
<key name="log_0060"><![CDATA[[ Error ] - The method Get->users_home() was called but 'user' was not passed or was empty.]]></key> <key name="log_0060">#!free!#</key>
<key name="log_0061"><![CDATA[[ Error ] - The method Get->users_home() was asked to find the home directory for the user: [#!variable!user!#], but was unable to do so.]]></key> <key name="log_0061"><![CDATA[[ Error ] - The method Get->users_home() was asked to find the home directory for the user: [#!variable!user!#], but was unable to do so.]]></key>
<key name="log_0062">SSH session opened without a password to: [#!variable!target!#].</key> <key name="log_0062">SSH session opened without a password to: [#!variable!target!#].</key>
<key name="log_0063">The database with the ID: [#!variable!id!#] did not respond to pings and 'database::#!variable!id!#::ping_before_connect' is not set to '0' in '#!data!path::configs::striker.conf!#', skipping it.</key> <key name="log_0063">The database with the ID: [#!variable!id!#] did not respond to pings and 'database::#!variable!id!#::ping_before_connect' is not set to '0' in '#!data!path::configs::striker.conf!#', skipping it.</key>
@ -155,9 +155,9 @@ The database connection error was:
<key name="log_0091">Failed to connect to any database.</key> <key name="log_0091">Failed to connect to any database.</key>
<key name="log_0092"><![CDATA[[ Error ] - Unable to connect to the database: [#!variable!server!#] (id: [#!variable!id!#]_.]]></key> <key name="log_0092"><![CDATA[[ Error ] - Unable to connect to the database: [#!variable!server!#] (id: [#!variable!id!#]_.]]></key>
<key name="log_0093"><![CDATA[[ Error ] - The method Alert->check_alert_sent() was called but the 'modified_date' parameter was not passed and/or 'sys::db_timestamp' is not set. Did the program fail to connect to any databases?]]></key> <key name="log_0093"><![CDATA[[ Error ] - The method Alert->check_alert_sent() was called but the 'modified_date' parameter was not passed and/or 'sys::db_timestamp' is not set. Did the program fail to connect to any databases?]]></key>
<key name="log_0094"><![CDATA[[ Error ] - The method Alert->check_alert_sent() was called but the 'name' parameter was not passed or it is empty.]]></key> <key name="log_0094">#!free!#</key>
<key name="log_0095"><![CDATA[[ Error ] - The method Alert->check_alert_sent() was called but the 'record_locator' parameter was not passed or it is empty.]]></key> <key name="log_0095">#!free!#</key>
<key name="log_0096"><![CDATA[[ Error ] - The method Alert->check_alert_sent() was called but the 'set_by' parameter was not passed or it is empty.]]></key> <key name="log_0096">#!free!#</key>
<key name="log_0097"><![CDATA[[ Error ] - The method Alert->check_alert_sent() was called but the 'set' parameter was not passed or it is empty. It should be 'set' or 'clear'.]]></key> <key name="log_0097"><![CDATA[[ Error ] - The method Alert->check_alert_sent() was called but the 'set' parameter was not passed or it is empty. It should be 'set' or 'clear'.]]></key>
<key name="log_0098"> <key name="log_0098">
[ Warning ] - Failed to set an alert because this host is not yet in the database. This can happen if the alert was set before this host was added to the database. [ Warning ] - Failed to set an alert because this host is not yet in the database. This can happen if the alert was set before this host was added to the database.
@ -168,16 +168,16 @@ The database connection error was:
- Name: [#!variable!alert_name!#] - Name: [#!variable!alert_name!#]
- Timestamp: [#!variable!modified_date!#] - Timestamp: [#!variable!modified_date!#]
</key> </key>
<key name="log_0099"><![CDATA[[ Error ] - The method Alert->register_alert() was called but the 'set_by' parameter was not passed or it is empty.]]></key> <key name="log_0099">#!free!#</key>
<key name="log_0100"><![CDATA[[ Error ] - The method Alert->register_alert() was called but the 'message_key' parameter was not passed or it is empty.]]></key> <key name="log_0100">#!free!#</key>
<key name="log_0101"><![CDATA[[ Error ] - The method Alert->register_alert() was called but the 'title_key' parameter was not passed or it is empty and 'header' is enable (default).]]></key> <key name="log_0101"><![CDATA[[ Error ] - The method Alert->register_alert() was called but the 'title_key' parameter was not passed or it is empty and 'header' is enable (default).]]></key>
<key name="log_0102">I am not recording the alert with message_key: [#!variable!message_key!#] to the database because its log level was lower than any recipients.</key> <key name="log_0102">I am not recording the alert with message_key: [#!variable!message_key!#] to the database because its log level was lower than any recipients.</key>
<key name="log_0103">The local machine's UUID was not read properly. It should be stored in: [#!data!sys::host_uuid!#] and contain hexadecimal characters in the format: '012345-6789-abcd-ef01-23456789abcd' and usually matches the output of 'dmidecode --string system-uuid'. If this file exists and if there is a string in the file, please verify that it is structured correctly.</key> <key name="log_0103">The local machine's UUID was not read properly. It should be stored in: [#!data!sys::host_uuid!#] and contain hexadecimal characters in the format: '012345-6789-abcd-ef01-23456789abcd' and usually matches the output of 'dmidecode --string system-uuid'. If this file exists and if there is a string in the file, please verify that it is structured correctly.</key>
<key name="log_0104">The database with ID: [#!variable!id!#] for: [#!variable!file!#] is behind.</key> <key name="log_0104">The database with ID: [#!variable!id!#] for: [#!variable!file!#] is behind.</key>
<key name="log_0105"><![CDATA[[ Error ] - The method Database->_find_behind_databases() was called but the 'source' parameter was not passed or it is empty.]]></key> <key name="log_0105">#!free!#</key>
<key name="log_0106">The database with ID: [#!variable!id!#] for: [#!variable!file!#] and table: [#!variable!table!#] is behind.</key> <key name="log_0106">The database with ID: [#!variable!id!#] for: [#!variable!file!#] and table: [#!variable!table!#] is behind.</key>
<key name="log_0107"><![CDATA[[ Error ] - The method Database->insert_or_update_states() was called but the 'state_name' parameter was not passed or it is empty.]]></key> <key name="log_0107">#!free!#</key>
<key name="log_0108"><![CDATA[[ Error ] - The method Database->insert_or_update_states() was called but the 'state_host_uuid' parameter was not passed or it is empty. Normally this is .]]></key> <key name="log_0108"><![CDATA[[ Error ] - The method Database->insert_or_update_states() was called but the 'state_host_uuid' parameter was not passed or it is empty. Normally this is set to 'sys::data_uuid'.]]></key>
<!-- Test words. Do NOT change unless you update 't/Words.t' or tests will needlessly fail. --> <!-- Test words. Do NOT change unless you update 't/Words.t' or tests will needlessly fail. -->
<key name="t_0000">Test</key> <key name="t_0000">Test</key>

Loading…
Cancel
Save