Skip to content

Commit

Permalink
Merge pull request #75 from input-output-hk/explorer-cluster
Browse files Browse the repository at this point in the history
Explorer cluster
  • Loading branch information
johnalotoski committed Mar 22, 2023
2 parents 7eb4a15 + ae03403 commit 866379f
Show file tree
Hide file tree
Showing 30 changed files with 1,128 additions and 546 deletions.
87 changes: 53 additions & 34 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions nix/cardano/alerts.nix
Expand Up @@ -9,6 +9,33 @@ let

in
{
bitte-system-modified = {
datasource = "vm";
rules =
(builtins.filter (e: !(builtins.elem e.alert ["SystemCpuUsedAlert"])) inputs.bitte-cells.bitte.alerts.bitte-system.rules)
++ [
{
alert = "SystemCpuUsedAlert";
expr = ''100 - cpu_usage_idle{cpu="cpu-total",host!="explorer"} > 90'';
for = "5m";
labels.severity = "critical";
annotations = {
description = "CPU has been above 90% on {{ $labels.host }} for more than 5 minutes.";
summary = "[System] CPU Used alert on {{ $labels.host }}";
};
}
{
alert = "SystemCpuUsedAlertExplorer";
expr = ''100 - cpu_usage_idle{cpu="cpu-total",host="explorer"} > 90'';
for = "30m";
labels.severity = "critical";
annotations = {
description = "CPU has been above 90% on {{ $labels.host }} for more than 30 minutes.";
summary = "[System] CPU Used alert on {{ $labels.host }}";
};
}
];
};

node = {
datasource = "vm";
Expand Down
10 changes: 9 additions & 1 deletion nix/cardano/environments/aux-config/default-aux.nix
@@ -1 +1,9 @@
inputs: {}
inputs: {
explorerAliases = [];

cardanoExplorerGwPrometheusExporterPort = 12699;
explorerActiveBackends = [];
explorerRosettaActiveBackends = [];

smashDelistedPools = [];
}
17 changes: 17 additions & 0 deletions nix/cardano/environments/aux-config/mainnet-aux.nix
Expand Up @@ -2,6 +2,23 @@ inputs:
let
inherit (inputs.nixpkgs) lib;
in lib.recursiveUpdate (import ./default-aux.nix inputs) {
explorerHostName = "explorer.cardano.org";
explorerAliases = ["explorer.mainnet.cardano.org" "explorer.cardano-mainnet.iohk.io"];

# WG_PUBKEY: wg pubkey < <(sops -d nix/metal/encrypted/wg/$AWS_EXT_NODES_NODENAME-private)
# Attr struct: {name = $AWS_EXT_NODES_NODENAME; publicKey = $WG_PUBKEY;}
explorerActiveBackends = [
{name = "explorer-1"; publicKey = "81yzO/clOEPyRiBXNfVIEQqdcr/QrnA5fhIEJym3MxI=";}
{name = "explorer-2"; publicKey = "qs1gZ5UY+u00byONElCW7bZ37Kxt6+pr865cN+bhBnI=";}
];

explorerRosettaActiveBackends = [
"explorer-1"
"explorer-2"
];

smashHostName = "smash.cardano-mainnet.iohk.io";

# Mainnet auxillary configuration parameters
smashDelistedPools = [
"b6f665ef4d02abc5ce551f3565ada97d870d603c724ba791c7975a6b"
Expand Down
2 changes: 1 addition & 1 deletion nix/cloud/hydrationProfiles.nix
Expand Up @@ -216,6 +216,7 @@ in {
dbsync
faucet
metal-explorer
bitte-system-modified
;

# Upstream alerts
Expand All @@ -224,7 +225,6 @@ in {
bitte-consul
bitte-deadmanssnitch
bitte-loki
bitte-system
bitte-vault
bitte-vm-health
bitte-vm-standalone
Expand Down

0 comments on commit 866379f

Please sign in to comment.