mirror of
https://gitlab.com/TECHNOFAB/coder-templates.git
synced 2026-02-02 11:25:05 +01:00
chore: add /etc/os-release for coder stat to work
This commit is contained in:
parent
1392cb7d0c
commit
7da286dcfe
2 changed files with 33 additions and 0 deletions
|
|
@ -25,6 +25,9 @@ pkgs.dockerTools.buildLayeredImage {
|
||||||
(writeTextDir "etc/nix/nix.conf" ''
|
(writeTextDir "etc/nix/nix.conf" ''
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
'')
|
'')
|
||||||
|
(writeTextDir "etc/os-release" ''
|
||||||
|
ID=nixos
|
||||||
|
'')
|
||||||
(writeTextDir "etc/passwd" "coder:x:1000:1000::/home/coder:/bin/bash")
|
(writeTextDir "etc/passwd" "coder:x:1000:1000::/home/coder:/bin/bash")
|
||||||
(writeTextDir "etc/shadow" "coder:!:::::::")
|
(writeTextDir "etc/shadow" "coder:!:::::::")
|
||||||
(writeTextDir "etc/group" "coder:x:1000:")
|
(writeTextDir "etc/group" "coder:x:1000:")
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,36 @@
|
||||||
coder_agent."coder" = {
|
coder_agent."coder" = {
|
||||||
arch = "\${var.arch}";
|
arch = "\${var.arch}";
|
||||||
os = "linux";
|
os = "linux";
|
||||||
|
metadata = [
|
||||||
|
{
|
||||||
|
display_name = "Container CPU Usage";
|
||||||
|
key = "0_cpu_usage";
|
||||||
|
script = "coder stat cpu --host=false";
|
||||||
|
interval = 10;
|
||||||
|
timeout = 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
display_name = "Container RAM Usage";
|
||||||
|
key = "1_ram_usage";
|
||||||
|
script = "coder stat mem --host=false";
|
||||||
|
interval = 10;
|
||||||
|
timeout = 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
display_name = "Home Disk";
|
||||||
|
key = "2_home_disk";
|
||||||
|
script = "coder stat disk --path $${HOME}";
|
||||||
|
interval = 60;
|
||||||
|
timeout = 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
display_name = "Nix Store Disk";
|
||||||
|
key = "3_nix_store_disk";
|
||||||
|
script = "coder stat disk --path /nix";
|
||||||
|
interval = 60;
|
||||||
|
timeout = 1;
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
coder_script."git_clone" = {
|
coder_script."git_clone" = {
|
||||||
agent_id = "\${coder_agent.coder.id}";
|
agent_id = "\${coder_agent.coder.id}";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue