* Started expanding Alert->register_alert() to actually implement it.
* Improved handling errors in Words->key().
* Started work on Striker's "Anvil!" menu section. Also cleaned up the power handling.
Signed-off-by: Digimer <digimer@alteeve.ca>
Thisisusedtokeepasetofalertsinacertainorderwhenconvertedtoanmessagebody.Bydefault,allalertshaveadefaultvalueof'9999',sotheywillbesortedusingtheirseveritylevel,andthenthetimetheywereenteredintothesystem.Ifthisissettoanumberlowerthanthis,thenthevalueherewillsort/prioritize messages over the severity/timevalues.Iftwoormorealertshavethesamesortposition,thenseverityandthentimestampswillbeused.
#print $THIS_FILE." ".__LINE__."; Anvil::Tools::Words->key()' called without a key name to read.\n";
$anvil->Log->entry({source=>$THIS_FILE,line=>__LINE__,level=>0,priority=>"err",raw=>"[ Error ] - Anvil::Tools::Words->key()' called without a key name to read."});
$error=1;
$error=1;
}
}
if(not$language)
if(not$language)
{
{
#print $THIS_FILE." ".__LINE__."; Anvil::Tools::Words->key()' called without a language, and 'defaults::languages::output' is not set.\n";
$anvil->Log->entry({source=>$THIS_FILE,line=>__LINE__,level=>0,priority=>"err",raw=>"[ Error ] - Anvil::Tools::Words->key()' called without a language, and 'defaults::languages::output' is not set."});
If we want to create services or helpers later, look under - /usr/lib/firewalld/
If we want to create services or helpers later, look under - /usr/lib/firewalld/
Core firewalld configs, including defaults zones, etc - /etc/firewalld/
Core firewalld configs, including defaults zones, etc - /etc/firewalld/
* Zones are meant to deal with dynamic environments and aren't that useful in mostly static server environments
* Zones are meant to deal with dynamic environments and aren't that useful in mostly static server environments
** Seem to be pre-configured sets of what is/isn't allowed. 'public' for IFN, 'work' for SN/BCN? 'external/internal' are for routing
** Configured in /etc/firewalld/zones/<zone>.xml - Create 'BCN', 'SN' and 'IFN'?
* Use 'firewall-cmd' WITHOUT '--permanent' for things like enabling the VNC port for a server. Use '--permanent' for everything else.
* Use 'firewall-cmd' WITHOUT '--permanent' for things like enabling the VNC port for a server. Use '--permanent' for everything else.
====
====
Striker as PXE server
Striker as PXE server
====
====
# NOTE: We DON'T enable DHCP. We'll turn it on as needed.
# NOTE: Apache needs to show dot-files! (anaconda looks for .treeinfo)
systemctl start tftp.socket
systemctl enable tftp.socket
# Bootloader for BIOS
# Bootloader for BIOS
OS="fedora28"
OS="fedora28"
mkdir /var/lib/tftpboot/
mkdir /var/lib/tftpboot/
@ -137,9 +121,6 @@ su - postgres -c "dropdb anvil" && su - postgres -c "createdb --owner admin anvi
su - postgres -c "psql anvil"
su - postgres -c "psql anvil"
All systems have a UUID, even VMs. Use that for system UUID in the future.
Changes made using tools such as nmcli do not require a reload but do require the associated interface to be put down and then up again. That can be done by using commands in the following format:
Changes made using tools such as nmcli do not require a reload but do require the associated interface to be put down and then up again. That can be done by using commands in the following format:
* nmcli dev disconnect interface-name
* nmcli dev disconnect interface-name
@ -716,3 +697,101 @@ cat: /sys/class/block/sdb/device/transport: No such file or directory
Disk size:
Disk size:
/sys/class/block/sda/size * <block size>
/sys/class/block/sda/size * <block size>
=====
man pages
1 Executable programs or shell commands
5 File formats and conventions eg /etc/passwd
7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
A manual page consists of several sections.
Conventional section names include NAME, SYNOPSIS, CONFIGURATION, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUE, ERRORS, ENVIRONMENT, FILES, VERSIONS, CONFORMING TO, NOTES, BUGS, EXAMPLE, AUTHORS, and SEE ALSO.
The following conventions apply to the SYNOPSIS section and can be used as a guide in other sections.
bold text type exactly as shown.
italic text replace with appropriate argument.
[-abc] any or all arguments within [ ] are optional.
-a|-b options delimited by | cannot be used together.
argument ... argument is repeatable.
[expression] ... entire expression within [ ] is repeatable.
====
BEGIN TRANSACTION;
DROP FUNCTION history_alerts() CASCADE;
DROP TABLE history.alerts;
DROP TABLE alerts;
CREATE TABLE alerts (
alert_uuid uuid not null primary key,
alert_host_uuid uuid not null, -- The name of the node or dashboard that this alert came from.
alert_set_by text not null,
alert_level integer not null, -- 1 (critical), 2 (warning), 3 (notice) or 4 (info)
alert_title text not null, -- ScanCore will read in the agents <name>.xml words file and look for this message key
alert_message text not null, -- ScanCore will read in the agents <name>.xml words file and look for this message key
alert_sort_position integer not null default 9999, -- The alerts will sort on this column. It allows for an optional sorting of the messages in the alert.
alert_show_header integer not null default 1, -- This can be set to have the alert be printed with only the contents of the string, no headers.
alert_levelintegernotnull,-- 1 (critical), 2 (warning), 3 (notice) or 4 (info)
alert_title_keytextnotnull,-- ScanCore will read in the agents <name>.xml words file and look for this message key
alert_titletextnotnull,-- ScanCore will read in the agents <name>.xml words file and look for this message key
alert_title_variablestextnotnull,-- List of variables to substitute into the message key. Format is 'var1=val1 #!# var2 #!# val2 #!# ... #!# varN=valN'.
alert_messagetextnotnull,-- ScanCore will read in the agents <name>.xml words file and look for this message key
alert_message_keytextnotnull,-- ScanCore will read in the agents <name>.xml words file and look for this message key
alert_sort_positionintegernotnulldefault9999,-- The alerts will sort on this column. It allows for an optional sorting of the messages in the alert.
alert_message_variablestextnotnull,-- List of variables to substitute into the message key. Format is 'var1=val1 #!# var2 #!# val2 #!# ... #!# varN=valN'.
alert_show_headerintegernotnulldefault1,-- This can be set to have the alert be printed with only the contents of the string, no headers.
alert_sorttextnotnull,-- The alerts will sort on this column. It allows for an optional sorting of the messages in the alert.
alert_headerintegernotnulldefault1,-- This can be set to have the alert be printed with only the contents of the string, no headers.
recipient_nametextnotnull,-- This is the recipient's name
recipient_emailtextnotnull,-- This is the recipient's email address or the file name, depending.
recipient_languagetext,-- If set, this is the language the user wants to receive alerts in. If not set, the default language is used.
recipient_new_levelintegernotnull,-- This is the alert level to use when automatically adding watch links to new systems. '0' tells us to ignore new systems.
<keyname="striker_0055">When you sync with a peer, this machine's data will be copied to and recorded on the peer's database. Data gathered by ScanCore will also be kept in sync on both dashboards, and any general purpose data collected by other dashboards while this one is offline will be copied back when this machine comes online. Should this machine ever be rebuilt, data recorded from before the rebuild will be automatically restored as well.</key>
<keyname="striker_0055">When you sync with a peer, this machine's data will be copied to and recorded on the peer's database. Data gathered by ScanCore will also be kept in sync on both dashboards, and any general purpose data collected by other dashboards while this one is offline will be copied back when this machine comes online. Should this machine ever be rebuilt, data recorded from before the rebuild will be automatically restored as well.</key>
<keyname="striker_0056">Update this Striker</key>
<keyname="striker_0056">Update System</key>
<keyname="striker_0057">This will update this system using any available software repositories. You can also use this to create or load update packs to allow for the update of offline or air-gapped Anvil! systems.</key>
<keyname="striker_0057">This will update this system using any available software repositories. You can also use this to create or load update packs to allow for the update of offline or air-gapped Anvil! systems.</key>
<keyname="striker_0058">Configure this Striker</key>
<keyname="striker_0058">Configure Striker</key>
<keyname="striker_0059">Update the network configuration for this Striker.</key>
<keyname="striker_0059">Update the network configuration for this Striker.</key>
<keyname="striker_0060">Welcome!</key>
<keyname="striker_0060">Welcome!</key>
<keyname="striker_0061">Create or manage Anvil! systems</key>
<keyname="striker_0061">Create or manage Anvil! systems</key>
@ -655,10 +655,10 @@ Here we will inject 't_0006', which injects 't_0001' which has a variable: [#!st
<keyname="striker_0088">The system will be updated momentarily. This system will now be in maintenance mode until the update is complete.</key>
<keyname="striker_0088">The system will be updated momentarily. This system will now be in maintenance mode until the update is complete.</key>
<keyname="striker_0089">This indicates whether this system needs to be rebooted or not.</key>
<keyname="striker_0089">This indicates whether this system needs to be rebooted or not.</key>
<keyname="striker_0090">This system is in maintenance mode and is not currently available.</key>
<keyname="striker_0090">This system is in maintenance mode and is not currently available.</key>
<keyname="striker_0091">Reboot this Striker</key>
<keyname="striker_0091">Reboot This System</key>
<keyname="striker_0092">This option will restart the host operating system. This is not currently needed.</key>
<keyname="striker_0092">This option will restart the host operating system. This is not currently needed.</key>
<keyname="striker_0093">This machine needs to be rebooted. This option will restart the host operating system.</key>
<keyname="striker_0093">This machine needs to be rebooted. This option will restart the host operating system.</key>
<keyname="striker_0094">Power off this Striker</key>
<keyname="striker_0094">Power Off This System</key>
<keyname="striker_0095">This will power off the Striker machine and leave it off. To power it back on, you will need physical access or cycle the power of the PDU feeding this Striker.</key>
<keyname="striker_0095">This will power off the Striker machine and leave it off. To power it back on, you will need physical access or cycle the power of the PDU feeding this Striker.</key>
<keyname="striker_0096">Recent and Running Jobs</key>
<keyname="striker_0096">Recent and Running Jobs</key>
<keyname="striker_0097">There are no jobs currently running or recently completed.</key>
<keyname="striker_0097">There are no jobs currently running or recently completed.</key>
@ -677,6 +677,8 @@ Here we will inject 't_0006', which injects 't_0001' which has a variable: [#!st
<keyname="striker_0110">The 'Install Target' feature is used to do base (stage 1) installs on new or rebuilt Striker dashboards, Anvil! nodes or Disaster Recivery hosts. Specifically, it allows machines to boot off their BCN network interface and install the base operating system.</key>
<keyname="striker_0110">The 'Install Target' feature is used to do base (stage 1) installs on new or rebuilt Striker dashboards, Anvil! nodes or Disaster Recivery hosts. Specifically, it allows machines to boot off their BCN network interface and install the base operating system.</key>
<keyname="striker_0111">The 'Install Target' disable job has been requested. It should be completed in a few moments. You may need to reload the next page in a minute to see that it has been enabled.</key>
<keyname="striker_0111">The 'Install Target' disable job has been requested. It should be completed in a few moments. You may need to reload the next page in a minute to see that it has been enabled.</key>
<keyname="striker_0112">The 'Install Target' enabled job has been requested. It should be completed in a few moments. You may need to reload the next page in a minute to see that it has been disabled.</key>
<keyname="striker_0112">The 'Install Target' enabled job has been requested. It should be completed in a few moments. You may need to reload the next page in a minute to see that it has been disabled.</key>
<keyname="striker_0113">Anvil! Configuration and Management.</key>
<keyname="striker_0114">Create a new Anvil! system.</key>