├── img ├── dashboard.png └── onion-service.png ├── ansible ├── requirements.yml ├── files │ ├── reflector.conf │ ├── override.conf │ ├── prometheus.yml │ ├── banner │ └── dashboard.json ├── vars │ └── ansible_sample.json ├── templates │ ├── torrc.j2 │ ├── sshd_config.j2 │ └── znc.conf.j2 ├── banner ├── user.yml ├── totp.yml ├── hardening.yml ├── tor.yml ├── packages.yml └── znc.yml ├── terraform ├── main.tf ├── variables.tf └── .terraform.lock.hcl ├── .gitignore ├── .terraform.lock.hcl ├── packer ├── variables.pkr.hcl └── main.pkr.hcl ├── README.md └── LICENSE /img/dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/denisse-dev/irc-bouncer/HEAD/img/dashboard.png -------------------------------------------------------------------------------- /img/onion-service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/denisse-dev/irc-bouncer/HEAD/img/onion-service.png -------------------------------------------------------------------------------- /ansible/requirements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | collections: 3 | - name: ansible.posix 4 | - name: community.grafana 5 | -------------------------------------------------------------------------------- /ansible/files/reflector.conf: -------------------------------------------------------------------------------- 1 | --country us 2 | --latest 15 3 | --protocol https 4 | --save /etc/pacman.d/mirrorlist --verbose 5 | --sort rate 6 | -------------------------------------------------------------------------------- /ansible/files/override.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | ExecStart= 3 | ExecStart=/usr/bin/proxychains4 /usr/bin/znc -f --datadir=/var/lib/znc/.znc 4 | User=znc 5 | -------------------------------------------------------------------------------- /ansible/files/prometheus.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | scrape_interval: 15s 4 | evaluation_interval: 15s 5 | 6 | scrape_configs: 7 | - job_name: 'prometheus' 8 | static_configs: 9 | - targets: ['localhost:9090'] 10 | - job_name: 'localhost' 11 | static_configs: 12 | - targets: ['localhost:9100'] 13 | -------------------------------------------------------------------------------- /ansible/vars/ansible_sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "irc_port": "", 3 | "liberachat_user": "", 4 | "oftc_user": "", 5 | "password_hash": "", 6 | "password_salt": "", 7 | "public_ssh_keys_url": "", 8 | "ssh_port": "", 9 | "tor_relay_contact_info": "", 10 | "tor_relay_nickname": "", 11 | "user_name": "", 12 | "znc_nick": "", 13 | "znc_pass": "", 14 | "znc_port": "", 15 | "znc_user": "" 16 | } 17 | -------------------------------------------------------------------------------- /terraform/main.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | linode = { 4 | source = "linode/linode" 5 | version = "1.25.1" 6 | } 7 | } 8 | required_version = ">= 0.14" 9 | } 10 | 11 | provider "linode" { 12 | token = var.linode_token 13 | } 14 | 15 | resource "linode_instance" "irc_bouncer" { 16 | image = var.image 17 | label = var.label 18 | region = var.region 19 | swap_size = var.swap_size 20 | type = var.type 21 | watchdog_enabled = var.watchdog_enabled 22 | 23 | alerts { 24 | cpu = 90 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ansible/templates/torrc.j2: -------------------------------------------------------------------------------- 1 | AccountingMax 960 GBytes 2 | ContactInfo {{ tor_relay_contact_info }} 3 | ControlPort 9051 4 | DataDirectory /var/lib/tor 5 | #HashedControlPassword 6 | HiddenServiceDir /var/lib/tor/hidden_service/ 7 | HiddenServicePort {{ grafana_port }} 127.0.0.1:{{ grafana_port }} 8 | HiddenServicePort {{ prometheus_port }} 127.0.0.1:{{ prometheus_port}} 9 | HiddenServicePort {{ prometheus_node_exporter_port }} 127.0.0.1:{{ prometheus_node_exporter_port }} 10 | HiddenServicePort {{ znc_port }} 127.0.0.1:{{ znc_port }} 11 | HiddenServiceAuthorizeClient stealth hidden_service 12 | Log notice syslog 13 | MapAddress 10.0.0.1 libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd.onion 14 | MapAddress 10.0.0.2 irc.oftc.net 15 | Nickname {{ tor_relay_nickname }} 16 | ORPort 9001 17 | RelayBandwidthBurst 35 MBytes 18 | RelayBandwidthRate 30 MBytes 19 | User tor 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Local .terraform directories 2 | **/.terraform/* 3 | 4 | # .tfstate files 5 | *.tfstate 6 | *.tfstate.* 7 | 8 | # Crash log files 9 | crash.log 10 | 11 | # Ignore any .tfvars files that are generated automatically for each Terraform run. Most 12 | # .tfvars files are managed as part of configuration and so should be included in 13 | # version control. 14 | # 15 | # example.tfvars 16 | 17 | # Ignore override files as they are usually used to override resources locally and so 18 | # are not checked in 19 | override.tf 20 | override.tf.json 21 | *_override.tf 22 | *_override.tf.json 23 | 24 | # Include override files you do wish to add to version control using negated pattern 25 | # 26 | # !example_override.tf 27 | 28 | # Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan 29 | # example: *tfplan* 30 | 31 | ansible/vars/ansible.json 32 | *.temp 33 | -------------------------------------------------------------------------------- /terraform/variables.tf: -------------------------------------------------------------------------------- 1 | variable "linode_token" { 2 | type = string 3 | sensitive = true 4 | description = "The client token to use to access Linode" 5 | } 6 | 7 | variable "image" { 8 | type = string 9 | description = "The OS image used to deploy the instance" 10 | } 11 | 12 | variable "label" { 13 | type = string 14 | default = "irc-bouncer" 15 | } 16 | 17 | variable "region" { 18 | type = string 19 | default = "us-central" 20 | description = "The location where the Linode is deployed" 21 | } 22 | 23 | variable "swap_size" { 24 | type = string 25 | default = 512 26 | description = "The disk size (MiB) allocated for swap space" 27 | } 28 | 29 | variable "type" { 30 | type = string 31 | default = "g6-nanode-1" 32 | description = "The Linode instance type" 33 | } 34 | 35 | variable "watchdog_enabled" { 36 | type = bool 37 | default = true 38 | description = "The watchdog reboots an instance if it powers off unexpectedly" 39 | } 40 | -------------------------------------------------------------------------------- /ansible/banner: -------------------------------------------------------------------------------- 1 | .,aadd"' `"bbaa,. 2 | ,ad8888P' `Y8888ba, 3 | ,a88888888 88888888a, 4 | a88888888888 88888888888a 5 | a8888888888888b, ,d8888888888888a 6 | d8888888888888888b,_ _,d8888888888888888b 7 | d88888888888888888888888888888888888888888888b 8 | d8888888888888888888888888888888888888888888888b 9 | I888888888888888888888888888888888888888888888888I 10 | ,88888888888888888888888888888888888888888888888888, 11 | I8888888888888888PY8888888PY88888888888888888888888I 12 | 8888888888888888" "88888" "88888888888888888888888 13 | 8::::::::::::::' `:::' `:::::::::::::::::::::8 14 | Ib:::::::::::" " `::::::' `:::::::::dI 15 | `8888888888P Y88888888888P Y88888888' 16 | Ib:::::::' `:::::::::' `:::::dI 17 | Yb::::" ":::::" "::dP 18 | Y88P Y8P `P 19 | Y' " 20 | `:::::::::::;8" 21 | "888888888888888888888888888888888888" 22 | `"8;::::::::::::::::::::::::::;8"' 23 | `"Ya;::::::::::::::::::;aP"' 24 | ``""YYbbaaaaddPP""'' 25 | -------------------------------------------------------------------------------- /.terraform.lock.hcl: -------------------------------------------------------------------------------- 1 | # This file is maintained automatically by "terraform init". 2 | # Manual edits may be lost in future updates. 3 | 4 | provider "registry.terraform.io/linode/linode" { 5 | version = "1.16.0" 6 | hashes = [ 7 | "h1:JpBtHnebAi6yr/aDdlk8EybaEiEY+VPtFP3o0QoMTng=", 8 | "zh:03c867440797b82012cd5d97f58fef5885dc0248683227299a39af836df222db", 9 | "zh:0486be7f72d6ea73d10140e23be8c1d2772b2d8be28c7bb39c73be83601405cf", 10 | "zh:181929d6880cac6500f4af1f3799385c47ccd69872cacf1042a3a48e445b2b02", 11 | "zh:18b7f6cc1ddf86e28322638607e1f84c1e9d56824c26903e22d4d12352f20b6e", 12 | "zh:4e65e7f9e17c334ff7047fc2dd8fc479c2509cba66834d89e2033a45e9275fe3", 13 | "zh:6077eda3fdf77a5158d9dc1a0c38492e23f7d679b1ac96382ba92ebe92e19266", 14 | "zh:642e7c96867c519176d84228a7f9104352212ae3c999b409eee1076b7ed90a96", 15 | "zh:6451f5117125fad9884214fe2f2635a2bed95912e64cf1c66a57c38558dfe907", 16 | "zh:83b957b30da19586393b9aea2cc93524a7d4c43dd07d11129a11d29c2b4bfb21", 17 | "zh:852954fe6cfe5278bd7c3d1079a9832bbf8c58436486489ed85154c0a0600633", 18 | "zh:a2385c51147a3c40707f7bfceb673c077e1054e8af6fb4c808cef56f995b8193", 19 | "zh:d21cd5cb5a635d18547430fe6cdfe3c6898541f9f3adc110edbf8d6e0439390d", 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /ansible/user.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | 4 | vars_files: 5 | - vars/ansible.json 6 | 7 | tasks: 8 | - name: Ensure the user is created 9 | ansible.builtin.user: 10 | name: "{{ user_name }}" 11 | - name: Ensure the user has sudo access 12 | ansible.builtin.lineinfile: 13 | path: "/etc/sudoers.d/{{ user_name }}" 14 | line: "{{ user_name }} ALL=(ALL) ALL" 15 | mode: "u=rw,g=r,o=r" 16 | create: true 17 | - name: Ensure my public SSH keys are added to the user 18 | ansible.builtin.authorized_key: 19 | user: "{{ user_name }}" 20 | state: present 21 | key: "{{ public_ssh_keys_url }}" 22 | path: "/home/{{ user_name }}/.ssh/authorized_keys" 23 | - name: Ensure the user password is disabled and expired 24 | ansible.builtin.command: "{{ item }}" 25 | with_items: 26 | - passwd -d {{ user_name }} 27 | - passwd -e {{ user_name }} 28 | changed_when: true 29 | - name: Ensure the TOTP playbook is inside the user home folder 30 | ansible.builtin.copy: 31 | src: totp.yml 32 | dest: /home/{{ user_name }}/totp.yml 33 | owner: "{{ user_name }}" 34 | group: "{{ user_name }}" 35 | mode: "u=rwx" 36 | remote_src: true 37 | -------------------------------------------------------------------------------- /ansible/templates/sshd_config.j2: -------------------------------------------------------------------------------- 1 | # $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $ 2 | Port {{ ssh_port }} 3 | HostKey /etc/ssh/ssh_host_ed25519_key 4 | SyslogFacility AUTHPRIV 5 | LogLevel VERBOSE 6 | PermitRootLogin no 7 | MaxAuthTries 3 8 | AuthorizedKeysFile .ssh/authorized_keys 9 | PasswordAuthentication no 10 | ChallengeResponseAuthentication no 11 | GSSAPIAuthentication yes 12 | GSSAPICleanupCredentials no 13 | UsePAM yes 14 | X11Forwarding no 15 | ClientAliveInterval 300 16 | ClientAliveCountMax 2 17 | AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES 18 | AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT 19 | AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE 20 | AcceptEnv XMODIFIERS 21 | Subsystem sftp /usr/libexec/openssh/sftp-server 22 | AuthorizedKeysCommand /opt/aws/bin/eic_run_authorized_keys %u %f 23 | AuthorizedKeysCommandUser ec2-instance-connect 24 | AuthenticationMethods publickey 25 | AllowUsers {{ user_name }} 26 | DenyUsers root 27 | Banner /etc/ssh/banner 28 | PrintLastLog yes 29 | HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-ed25519 30 | KexAlgorithms curve25519-sha256 31 | Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com 32 | MACs hmac-sha2-512,hmac-sha2-512-etm@openssh.com 33 | -------------------------------------------------------------------------------- /packer/variables.pkr.hcl: -------------------------------------------------------------------------------- 1 | variable "linode_token" { 2 | description = "The client token to use to access your Linode account" 3 | sensitive = true 4 | type = string 5 | } 6 | 7 | variable "control_pass" { 8 | description = "The password for Tor's control" 9 | type = string 10 | } 11 | 12 | variable "user" { 13 | description = "The username of the Linode instance" 14 | type = string 15 | } 16 | 17 | variable "image" { 18 | default = "linode/arch" 19 | description = "The image ID used to create the new image" 20 | type = string 21 | } 22 | 23 | variable "image_description" { 24 | default = "The Linode image for the IRC Bouncer project" 25 | type = string 26 | } 27 | 28 | variable "image_label" { 29 | default = "irc-bouncer-builder" 30 | type = string 31 | } 32 | 33 | variable "region" { 34 | default = "us-central" 35 | type = string 36 | } 37 | 38 | variable "instance_type" { 39 | default = "g6-nanode-1" 40 | type = string 41 | } 42 | 43 | variable "swap_size" { 44 | default = 512 45 | description = "The disk size (MiB) allocated for swap space" 46 | type = string 47 | } 48 | 49 | variable "ssh_username" { 50 | default = "root" 51 | description = "The SSH username to use when building the image" 52 | type = string 53 | } 54 | -------------------------------------------------------------------------------- /ansible/totp.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | 4 | tasks: 5 | - name: Ensure keyboard-interactive:pam is added to AuthenticationMethdos 6 | lineinfile: 7 | path: /etc/ssh/sshd_config 8 | regexp: '^AuthenticationMethods' 9 | line: AuthenticationMethods publickey keyboard-interactive:pam 10 | - name: Ensure ChallengeResponseAuthentication is enabled 11 | lineinfile: 12 | path: /etc/ssh/sshd_config 13 | regexp: '^ChallengeResponseAuthentication' 14 | line: ChallengeResponseAuthentication yes 15 | - name: Ensure UsePAM is enabled 16 | lineinfile: 17 | path: /etc/ssh/sshd_config 18 | line: UsePAM yes 19 | insertbefore: EOF 20 | - name: Ensure google_authenticator is added to PAM SSH 21 | lineinfile: 22 | path: /etc/pam.d/sshd 23 | line: auth required pam_google_authenticator.so 24 | insertbefore: BOF 25 | - name: Ensure system-remote-login is disabled on PAM SSH 26 | lineinfile: 27 | path: /etc/pam.d/sshd 28 | regexp: '^auth include system-remote-login' 29 | line: '#auth include system-remote-login' 30 | - name: Ensure the SSH daemon is reloaded 31 | systemd: 32 | name: sshd 33 | state: reloaded 34 | - name: Ensure the SSH daemon is restarted 35 | systemd: 36 | name: sshd 37 | state: restarted 38 | -------------------------------------------------------------------------------- /terraform/.terraform.lock.hcl: -------------------------------------------------------------------------------- 1 | # This file is maintained automatically by "terraform init". 2 | # Manual edits may be lost in future updates. 3 | 4 | provider "registry.terraform.io/linode/linode" { 5 | version = "1.25.1" 6 | hashes = [ 7 | "h1:kNBJat6vK3+lVWMUdv2HUcmU2j5UWrnojxkl0zfP+4Q=", 8 | "zh:011d31d5ba135db140a9e4d34b6a358b05f26e9649fa3ac252ba5753be87dbc7", 9 | "zh:0c61b38aa196c7bbc12285893c9a8a5e995e56fd6a013329774c670b62b38897", 10 | "zh:1227a34a2002145aa4817999a08cdba3f0f412d51d24f4848aa0a9b08a58f186", 11 | "zh:4f6c119d150576ee737aa532062378e577a0754b85c32eec988ee094af798a07", 12 | "zh:62751d4e56c38cd4952a69746a2c941a28d6b76fa12173fb7d135ba999d3b7ae", 13 | "zh:743c1f54c40c2a129df35c0deb0a4af899472ff85fb79a58a282b2107072954c", 14 | "zh:78a7c6d4a75eae1e6753bf74341245739f65d90ff4c78bdeab49a579db678a52", 15 | "zh:835b587b57caa1e695bdc932e0036efafd3a069bfae3151e1d574c854eaef24c", 16 | "zh:93a797797f7c566af735802a4da17a0adbf4b5303cb2fcd62173289a2211b059", 17 | "zh:942bb3aef76f55067379d991a64f9641f44f5d40ed8d31f8857683bb75ee3f47", 18 | "zh:9bd2bc6fa211153cff5487ac3a8afad24f742cd946985eade67dc413c0a47d84", 19 | "zh:a4f9dfef3a29e861282b6ef8917819f351da8fb00b390cb75549718b6c8b9dc4", 20 | "zh:af185b9471439c37dc0580871eb230a36f4cfc0dbb75c3ec911242a56b92efda", 21 | "zh:eb7dfa4e9041a947ff776b9fd0da06790bd5ea23c26e4c5332f88f9ff3b24cff", 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /ansible/files/banner: -------------------------------------------------------------------------------- 1 | ▓▓█ 2 | ▒██▒▒█ 3 | █▓▓▓░▒▓▓ 4 | ▒█▓▒█░▒▒▒█ 5 | ▒█▒▒▒█▒▒▒▒▓▒ 6 | ▓▓▒░ ▓█▒▒▒▓██▓▒░▒█ 7 | █▓▓██▓░ ▓█▒▒▒▒████▒▒▒█ 8 | ▓█▓▒▒▓██▓░ ▒█▒▒▒▒▒██▓█▓░░▓▒ 9 | ▓▒▓▒▒▒▒▒▓█▓░ ░▒▒▓▓██▒▒▒▒▒▒█████▒▒▒▓ 10 | ▓░█▒▒▒▒▒▒▒▓▓█▓█▓▓▓▓▒▒▒▒▒▒▒▒██▓██▒░▒█ 11 | ▓░▓█▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓████▒▒▒█ 12 | ▓░▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▒▒▒▒▒▒▒▒▒▓██░░░█ 13 | ▓░▓███▒▒▒▒▒▒▒▒▒▒▒▓█▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▒▓▓ 14 | ▒▒▒██▓▒▓█▓▒▒▒▒▒▒▒▓▒▒▒▒▒▒▓▓▓▒▒▒▒▒▒▒▓▒█ 15 | ▓▒█▓▒▒▒▒▓▒▒▒▒▒▒▒▒▒▒▒▓█▓▓▓▓█▓▒▒▒▒▒▒▒▓▒ 16 | ▓▒█▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ▓█▓▒▒▒▒▒▓█ 17 | ▒▒▓▒▒▒▓▓▓▒▒▒▒▒▒▒▒▒▓▓ ░▓▓ █▓▒▒▒▒▒█ 18 | █▒▒▓▓▓▒▒▓▓▒▒▒▒▒▒▓▓ █████▓ █▓▒▒▒▒▓▒ 19 | ▓▓█▒ ▒▓▒▒▒▒▒█ ░██████ ░█▒▒▒▒▓▓ 20 | ▓█▒ ▒███ ▒▓▒▒▒▒█ ██████ ▓▒▒▒▒▒▓ 21 | ██ █████ █▒▒▒▒█ ███▓ ▓▓▒▒▒▒▓ 22 | █▓ █████ ▒▓▒▒▒█ █▓▓▓▒▒▓ 23 | █▓ ░███ ░▓▒▒▒▓█ ░█▓▒▒▒▓▒▓ 24 | ██ ▒▓▒▒▒▒▓▓ ░▒▓█▓ ░▓▓ 25 | ▓█░ █▓██▓▒▒▓█▓▓▓▓██▓▓▒▓▒░░▒▓▒▓ 26 | ▒██░ ▓▒███▓▒▒▒▒▓▓▓▓▒▒▒▒▒▒▓▓▓▓▒▓ 27 | █▓█▓▓▒▒▓█▓▒░██▒▒▓▓█▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓█▒ 28 | ▓ ░▓▓▓▓▓▒▓▓▓▓▒▓▓▓▒▓▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓ 29 | ▒▒▒▓▒▒▒▒▒▒▓█░ ░░░ ▓▓▒▒▒▒▒▒▒▒▒▒▒▓██▓▒ 30 | █▓▒▒▒▒▒▒▒▒▓▓ ░░░ ▓▓▒▒▒▒▒▒▒▒▒▓▓▓▒▒▓▒ 31 | ██▓▓▒▒▒▒▒▒█▒░░░░█▒▒▒▒▒▒▒▒▓█▓▓▒▒▒▒▒ 32 | ░ ▒██▓▓▒▒▒▒▒█▓▒▒▓▒▒▒▒▒▒▓███▓▒▒▒▒▒▓▓ 33 | ░▒▓▓▓▓▒▒▓▓▓▓▓▓████▓▓█▒▒▒▒▒▓▓█░ 34 | -------------------------------------------------------------------------------- /ansible/hardening.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | 4 | vars_files: 5 | - vars/ansible.json 6 | 7 | tasks: 8 | - name: Ensure the hardened SSH config replaces the default config 9 | ansible.builtin.template: 10 | src: templates/sshd_config.j2 11 | dest: /etc/ssh/sshd_config 12 | owner: root 13 | group: root 14 | mode: "u=rw" 15 | validate: /usr/sbin/sshd -t -f %s 16 | - name: Ensure the SSH banner is in place 17 | ansible.builtin.copy: 18 | src: files/banner 19 | dest: /etc/ssh/banner 20 | owner: "{{ user_name }}" 21 | group: "{{ user_name }}" 22 | mode: "u=rw,g=r,o=r" 23 | - name: Ensure the SSH daemon is reloaded and restarted 24 | ansible.builtin.systemd: 25 | name: sshd 26 | state: restarted 27 | daemon_reload: true 28 | - name: Ensure the firewalld daemon is enabled 29 | ansible.builtin.systemd: 30 | name: firewalld 31 | enabled: true 32 | - name: Ensure the new SSH port is open permanently 33 | ansible.builtin.command: "firewall-offline-cmd --zone=public --add-port={{ ssh_port }}/tcp" 34 | - name: Ensure the TLS IRC port is open permanently 35 | ansible.builtin.command: "firewall-offline-cmd --zone=public --add-port={{ irc_port }}/tcp" 36 | - name: Ensure the 'root' user is disabled 37 | ansible.builtin.lineinfile: 38 | path: /etc/passwd 39 | regexp: '^root:x:0:0:root:/root:/bin/bash' 40 | line: root:x:0:0:root:/root:/sbin/nologin 41 | -------------------------------------------------------------------------------- /ansible/tor.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | 4 | vars_files: 5 | - vars/ansible.json 6 | 7 | tasks: 8 | - name: Ensure the user belongs to the group tor 9 | ansible.builtin.user: 10 | name: "{{ user_name }}" 11 | groups: tor 12 | append: true 13 | - name: Ensure the Tor configuration directory exists 14 | ansible.builtin.file: 15 | path: /etc/tor/ 16 | state: directory 17 | mode: '0755' 18 | - name: Ensure the Tor configuration is in place 19 | ansible.builtin.template: 20 | src: templates/torrc.j2 21 | dest: /etc/tor/torrc 22 | owner: znc 23 | group: znc 24 | mode: '0644' 25 | - name: Ensure Tor's control password is hashed 26 | ansible.builtin.shell: "tor --quiet --hash-password {{ control_pass }}" 27 | register: control_pass_hash 28 | - name: Ensure Tor's control password hash is stored 29 | ansible.builtin.lineinfile: 30 | path: /etc/tor/torrc 31 | regexp: '^#HashedControlPassword' 32 | line: "HashedControlPassword {{ control_pass_hash.stdout }}" 33 | - name: Ensure the Tor daemon is reloaded and restared 34 | ansible.builtin.systemd: 35 | daemon_reload: true 36 | enabled: true 37 | name: tor 38 | state: started 39 | - name: Ensure Tor's hidden port is retrieved 40 | ansible.builtin.shell: 41 | cmd: cat /var/lib/tor/hidden_service/hostname 42 | register: hidden_service 43 | - name: Ensure Tor's hidden port is printed 44 | ansible.builtin.debug: 45 | var: hidden_service.stdout_lines 46 | -------------------------------------------------------------------------------- /packer/main.pkr.hcl: -------------------------------------------------------------------------------- 1 | packer { 2 | required_plugins { 3 | linode = { 4 | version = ">= 0.0.1" 5 | source = "github.com/hashicorp/linode" 6 | } 7 | } 8 | } 9 | 10 | source "linode" "irc_bouncer" { 11 | image = var.image 12 | image_description = var.image_description 13 | image_label = var.image_label 14 | instance_label = var.image_label 15 | instance_type = var.instance_type 16 | linode_token = var.linode_token 17 | region = var.region 18 | ssh_username = var.ssh_username 19 | swap_size = var.swap_size 20 | } 21 | 22 | build { 23 | name = "irc_bouncer" 24 | sources = [ 25 | "source.linode.irc_bouncer" 26 | ] 27 | 28 | provisioner "shell" { 29 | inline = [ 30 | "pacman -Sy reflector --noconfirm", 31 | "reflector --country us --latest 15 --protocol https --sort rate --save /etc/pacman.d/mirrorlist --verbose", 32 | "sed -i 's/^#ParallelDownloads = 5/ParallelDownloads = 10/' /etc/pacman.conf", 33 | "pacman -Su --noconfirm", 34 | "pacman -S ansible --noconfirm" 35 | ] 36 | } 37 | 38 | provisioner "ansible-local" { 39 | playbook_dir = "ansible" 40 | playbook_files = [ 41 | "ansible/user.yml", 42 | "ansible/packages.yml", 43 | "ansible/hardening.yml", 44 | "ansible/znc.yml", 45 | "ansible/tor.yml" 46 | ] 47 | extra_arguments = [ 48 | "--extra-vars", 49 | "\"control_pass=${var.control_pass}\"", 50 | "-vvv" 51 | ] 52 | galaxy_command = "ansible-galaxy collection install --requirements-file" 53 | galaxy_file = "ansible/requirements.yml" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /ansible/packages.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | 4 | tasks: 5 | - name: Ensure the list of dependencies is fulfilled 6 | ansible.builtin.pacman: 7 | name: 8 | - emacs-nox 9 | - firewalld 10 | - grafana 11 | - libpam-google-authenticator 12 | - nyx 13 | - prometheus 14 | - prometheus-node-exporter 15 | - proxychains-ng 16 | - qrencode 17 | - tmux 18 | - tor 19 | - torsocks 20 | - znc 21 | - znc-clientbuffer 22 | state: present 23 | - name: Ensure the reflector configuration is in place 24 | ansible.builtin.copy: 25 | src: files/reflector.conf 26 | dest: /etc/xdg/reflector/reflector.conf 27 | owner: root 28 | group: root 29 | mode: '0644' 30 | - name: Ensure the reflector service is started and enabled 31 | ansible.builtin.systemd: 32 | name: reflector 33 | enabled: true 34 | - name: Ensure the grafana service is started and enabled 35 | ansible.builtin.systemd: 36 | name: grafana 37 | enabled: true 38 | - name: Ensure the prometheus configuration is in place 39 | ansible.builtin.copy: 40 | src: files/prometheus.yml 41 | dest: /etc/prometheus/prometheus.yml 42 | owner: root 43 | group: root 44 | mode: '0644' 45 | - name: Ensure the prometheus service is started and endabled 46 | ansible.builtin.systemd: 47 | name: prometheus 48 | enabled: true 49 | - name: Ensure the prometheus prometheus-node-exporter service is started and enabled 50 | ansible.builtin.systemd: 51 | name: prometheus-node-exporter 52 | enabled: true 53 | -------------------------------------------------------------------------------- /ansible/templates/znc.conf.j2: -------------------------------------------------------------------------------- 1 | AnonIPLimit = 10 2 | AuthOnlyViaModule = false 3 | ConfigWriteDelay = 0 4 | ConnectDelay = 5 5 | HideVersion = true 6 | LoadModule = webadmin 7 | MaxBufferSize = 500 8 | ProtectWebSessions = true 9 | SSLCertFile = /var/lib/znc/.znc/znc.pem 10 | SSLDHParamFile = /var/lib/znc/.znc/znc.pem 11 | SSLKeyFile = /var/lib/znc/.znc/znc.pem 12 | ServerThrottle = 30 13 | Version = 1.8.2 14 | 15 | 16 | AllowIRC = false 17 | AllowWeb = true 18 | IPv4 = true 19 | IPv6 = true 20 | Port = {{ znc_port }} 21 | SSL = false 22 | URIPrefix = / 23 | 24 | 25 | 26 | AllowIRC = true 27 | AllowWeb = false 28 | IPv4 = true 29 | IPv6 = true 30 | Port = 6697 31 | SSL = true 32 | URIPrefix = / 33 | 34 | 35 | 36 | Admin = true 37 | AltNick = {{ znc_nick }}_ 38 | AppendTimestamp = false 39 | AuthOnlyViaModule = false 40 | AutoClearChanBuffer = true 41 | AutoClearQueryBuffer = true 42 | ChanBufferSize = 50 43 | DenyLoadMod = false 44 | DenySetBindHost = false 45 | Ident = {{ znc_nick }} 46 | JoinTries = 10 47 | LoadModule = chansaver 48 | LoadModule = controlpanel 49 | MaxJoins = 0 50 | MaxNetworks = 1 51 | MaxQueryBuffers = 50 52 | MultiClients = true 53 | Nick = {{ znc_nick }} 54 | NoTrafficTimeout = 180 55 | PrependTimestamp = true 56 | QueryBufferSize = 50 57 | QuitMsg = %znc% 58 | RealName = {{ znc_nick }} 59 | StatusPrefix = * 60 | TimestampFormat = [%H:%M:%S] 61 | 62 | 63 | Encoding = ^UTF-8 64 | FloodBurst = 9 65 | FloodRate = 2.00 66 | IRCConnectEnabled = true 67 | JoinDelay = 0 68 | LoadModule = cert 69 | LoadModule = sasl 70 | LoadModule = simple_away 71 | LoadModule = clientbuffer 72 | Server = 10.0.0.1 +6697 73 | TrustAllCerts = false 74 | TrustPKI = true 75 | 76 | 77 | 78 | Encoding = ^UTF-8 79 | FloodBurst = 9 80 | FloodRate = 2.00 81 | IRCConnectEnabled = true 82 | JoinDelay = 0 83 | LoadModule = cert 84 | LoadModule = clientbuffer 85 | LoadModule = sasl 86 | LoadModule = simple_away 87 | Server = 10.0.0.2 +6697 88 | TrustAllCerts = false 89 | TrustPKI = true 90 | 91 | 92 | 93 | Hash = {{ password_hash }} 94 | Method = SHA256 95 | Salt = {{ password_salt }} 96 | 97 | 98 | -------------------------------------------------------------------------------- /ansible/znc.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | 4 | vars_files: 5 | - vars/ansible.json 6 | 7 | tasks: 8 | - name: Ensure the ZNC configuration directory exists 9 | ansible.builtin.file: 10 | path: /var/lib/znc/.znc/configs/ 11 | state: directory 12 | mode: '0755' 13 | - name: Ensure the LiberaChat network directory exists 14 | ansible.builtin.file: 15 | path: /var/lib/znc/.znc/users/{{ znc_user }}/networks/liberachat/moddata/cert/ 16 | state: directory 17 | mode: '0755' 18 | - name: Ensure the OFTC network directory exists 19 | ansible.builtin.file: 20 | path: /var/lib/znc/.znc/users/{{ znc_user }}/networks/oftc/moddata/cert/ 21 | state: directory 22 | mode: '0755' 23 | - name: Ensure the ownership of the ZNC directory is changed 24 | ansible.builtin.file: 25 | path: /var/lib/znc/.znc/ 26 | state: directory 27 | recurse: true 28 | owner: znc 29 | group: znc 30 | mode: 755 31 | - name: Ensure the ZNC configuration is in place 32 | ansible.builtin.template: 33 | src: templates/znc.conf.j2 34 | dest: /var/lib/znc/.znc/configs/znc.conf 35 | owner: znc 36 | group: znc 37 | mode: '0644' 38 | - name: Ensure the ZNC certificate is created 39 | become: true 40 | become_user: znc 41 | shell: 42 | cmd: znc --makepem 43 | - name: Ensure the ZNC certificate fingerprint is obtained 44 | ansible.builtin.shell: 45 | cmd: cat /var/lib/znc/.znc/znc.pem | openssl x509 -sha512 -fingerprint -noout | tr -d ':' | tr 'A-Z' 'a-z' | cut -d = -f 2 46 | register: znc_cert_fingerprint 47 | - name: Ensure the ZNC certificate fingerprint is printed 48 | ansible.builtin.debug: 49 | var: znc_cert_fingerprint.stdout_lines 50 | - name: Ensure the LiberaChat network user certificate is created 51 | ansible.builtin.shell: 52 | cmd: openssl req -x509 -new -newkey rsa:4096 -sha256 -days 1096 -nodes -out user.pem -keyout user.pem -subj "/CN={{ liberachat_user }}" 53 | args: 54 | chdir: /var/lib/znc/.znc/users/{{ znc_user }}/networks/liberachat/moddata/cert/ 55 | - name: Ensure the OFTC network user certificate is created 56 | ansible.builtin.shell: 57 | cmd: openssl req -nodes -newkey rsa:4096 -keyout user.pem -x509 -days 3650 -out user.pem -subj "/CN={{ oftc_user }}" 58 | args: 59 | chdir: /var/lib/znc/.znc/users/{{ znc_user }}/networks/oftc/moddata/cert/ 60 | - name: Ensure the fingerprint for the user certificate is printed 61 | ansible.builtin.shell: 62 | cmd: openssl x509 -in user.pem -noout -fingerprint -sha512 | awk -F= '{gsub(":",""); print tolower ($2)}' 63 | args: 64 | chdir: /var/lib/znc/.znc/users/{{ znc_user }}/networks/liberachat/moddata/cert/ 65 | register: liberachat_fingerprint 66 | - name: Ensure the user certificate fingerprint is printed 67 | ansible.builtin.debug: 68 | var: liberachat_fingerprint.stdout_lines 69 | - name: Ensure the fingerprint for the user certificate is printed 70 | ansible.builtin.shell: 71 | cmd: openssl x509 -sha1 -noout -fingerprint -in user.pem | sed -e 's/^.*=//;s/://g;y/ABCDEF/abcdef/' 72 | args: 73 | chdir: /var/lib/znc/.znc/users/{{ znc_user }}/networks/oftc/moddata/cert/ 74 | register: oftc_fingerprint 75 | - name: Ensure the OFTC certificate fingerprint is printed 76 | ansible.builtin.debug: 77 | var: oftc_fingerprint.stdout_lines 78 | - name: Ensure the LiberaChat certificate belongs to the ZNC user 79 | ansible.builtin.file: 80 | path: /var/lib/znc/.znc/users/{{ znc_user }}/networks/liberachat/moddata/cert/user.pem 81 | owner: znc 82 | group: znc 83 | - name: Ensure the OFTC certificate belongs to the ZNC user 84 | ansible.builtin.file: 85 | path: /var/lib/znc/.znc/users/{{ znc_user }}/networks/oftc/moddata/cert/user.pem 86 | owner: znc 87 | group: znc 88 | - name: Ensure the ZNC service is enabled 89 | ansible.builtin.systemd: 90 | name: znc 91 | enabled: true 92 | - name: Ensure the ZNC systemd directory exists 93 | ansible.builtin.file: 94 | path: /etc/systemd/system/znc.service.d/ 95 | state: directory 96 | - name: Ensure the ZNC daemon override is in place 97 | ansible.builtin.copy: 98 | src: files/override.conf 99 | dest: /etc/systemd/system/znc.service.d/override.conf 100 | owner: root 101 | group: root 102 | mode: '0644' 103 | - name: Ensure the ZNC daemon is reloaded and restared 104 | ansible.builtin.systemd: 105 | state: restarted 106 | daemon_reload: true 107 | name: znc 108 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | This repository contains Terraform, Packer, and Ansible configuration to deploy an Arch Linux Linode instance that hosts a ZNC IRC bouncer that uses Tor, an Onion service to access the bouncer webadmin and a Tor middle relay. 4 | 5 | # Pre requisites 6 | 7 | - A [Linode API Token](https://www.linode.com/docs/products/tools/linode-api/guides/get-access-token/) with **Read/Write** access for the **Images** and **Linodes** scopes. 8 | - The following packages: 9 | - [ansible](https://archlinux.org/packages/community/any/ansible/) 10 | - [packer](https://archlinux.org/packages/community/x86_64/packer/) 11 | - [terraform](https://archlinux.org/packages/community/x86_64/terraform/) 12 | 13 | # Deploying the bouncer 14 | 15 | ## Build image 16 | 17 | 1. To export Packer variables: 18 | 19 | ```bash 20 | set +o history # unset bash history 21 | unset HISTFILE # unset zsh history 22 | 23 | export PKR_VAR_linode_token= 24 | export PKR_VAR_user= 25 | export PKR_VAR_ssh_keys= 26 | export PKR_VAR_control_pass= 27 | ``` 28 | 29 | 2. To install packer plugins: 30 | 31 | ```bash 32 | packer init packer 33 | ``` 34 | 35 | 3. To build an image: 36 | 37 | ```bash 38 | packer build packer 39 | ``` 40 | 41 | The following variables are shown in STDOUT and are required for the next steps: 42 | 43 | 1. **znc_cert_fingerprint** 44 | 1. **liberachat_fingerprint** 45 | 1. **oftc_fingerprint** 46 | 1. **hidden_service** 47 | 1. **linode_image** 48 | 49 |
50 | 51 | ![Screenshot of Ansible's output showing three certificate variables ](img/fingerprints.svg) 52 | 53 |
54 | 55 | ## Deploy image 56 | 57 | 1. To export Terraform variables: 58 | 59 | ```bash 60 | set +o history # unset bash history 61 | unset HISTFILE # unset zsh history 62 | 63 | export TF_VAR_linode_token= 64 | export TF_VAR_image= 65 | ``` 66 | 67 | 2. To deploy an instance 68 | 69 | ```bash 70 | terraform -chdir=terraform init 71 | terraform -chdir=terraform apply 72 | ``` 73 | 74 | 3. To connect to the instance: 75 | 76 | ```bash 77 | ssh @ -p 78 | ``` 79 | 80 | You're required to set-up your password upon first login: 81 | 82 |
83 | 84 | ![Terminal showing how to set password of the instance user](img/set-password.svg) 85 | 86 |
87 | 88 | First login: 89 | 90 |
91 | 92 | ![Terminal showing the first SSH login](img/first-login.svg) 93 | 94 |
95 | 96 | ## Access ZNC's webadmin 97 | 98 | - To get the Onion Service URL: 99 | 100 | ```bash 101 | cat /var/lib/tor/hidden_service/hostname 102 | ``` 103 | 104 | - To get ZNC's port 105 | 106 | ```bash 107 | sed --quiet --expression '/Port/p' /var/lib/znc/.znc/configs/znc.conf 108 | ``` 109 | 110 | Access ZNC's webadmin using the onion service and the port, (ex. `http://owgtuxw3dd2m2cyii5nzxk6bohzggragerdvzdsev6uhjyb3cfn2u5yd.onion:15763/`): 111 | 112 | ![Screenshot showing ZNC's user interface via an Onion Service](img/onion-service.png) 113 | 114 | # Connecting to the bouncer 115 | 116 | The following stpes are done in an IRC client like WeeChat. 117 | 118 | ## Add SSL certificates for [SASL External](https://en.wikipedia.org/wiki/Simple_Authentication_and_Security_Layer) authentication 119 | 120 | ### Adding the LiberaChat network: 121 | 122 | 1. To connect to LiberaChat directly: 123 | 124 | ```bash 125 | /server add liberachat-direct irc.libera.chat/6697 -ssl 126 | /set irc.server.liberachat-direct.nicks 127 | /save 128 | /connect liberachat-direct 129 | ``` 130 | 131 | 2. To add the SSL certificate to LiberaChat: 132 | 133 | ```bash 134 | /msg NickServ cert add 135 | ``` 136 | 137 | 3. To connect to LiberaChat using ZNC: 138 | 139 | ```bash 140 | /server add liberachat-znc /6697 -ssl -username=/liberachat -password= 141 | /set irc.server.liberachat-znc.ssl_fingerprint 142 | /save 143 | /connect liberachat-znc 144 | ``` 145 | 146 | 3. To use SASL External: 147 | 148 | ```bash 149 | /query *sasl Mechanism EXTERNAL 150 | ``` 151 | 152 | 4. To accept LiberaChat's SSL fingerprint: 153 | 154 | Move to the ***status** buffer, then add the certificate: 155 | 156 | ```bash 157 | /znc AddTrustedServerFingerprint 158 | ``` 159 | 160 | 5. To use clientbuffer: 161 | 162 | ```bash 163 | /query *clientbuffer AddClient 164 | /disconnect -all 165 | /set irc.server.liberachat-znc.username "@/liberachat" 166 | ``` 167 | 168 | ### Adding the OFTC network: 169 | 170 | 1. To connect to OFTC: 171 | 172 | ```bash 173 | /server add oftc-direct irc.oftc.net/6697 -ssl 174 | /set irc.server.oftc.nicks 175 | /save 176 | /connect oftc-direct 177 | ``` 178 | 179 | 2. To add the SSL certificate to OFTC: 180 | 181 | ```bash 182 | /msg NickServ cert add 183 | ``` 184 | 185 | 3. To use SASL External: 186 | 187 | ```bash 188 | /server add oftc-znc -ssl -username=/oftc -password= 189 | /set irc.server.oftc-znc.ssl_fingerprint 190 | /save 191 | /connect oftc-znc 192 | /query *sasl Mechanism EXTERNAL 193 | ``` 194 | 195 | 4. To accept LiberaChat's SSL fingerprint: 196 | 197 | Move to the ***status** buffer, then add the certificate: 198 | 199 | ```bash 200 | /znc AddTrustedServerFingerprint 201 | ``` 202 | 203 | 5. To use clientbuffer: 204 | 205 | ```bash 206 | /query *clientbuffer AddClient 207 | /disconnect -all 208 | /set irc.server.oftc-znc.username "@/oftc" 209 | ``` 210 | 211 | ## Monitoring 212 | 213 | The following services are accessible from the Tor network: 214 | 215 | | Service | Port | 216 | | ----------- | ---- | 217 | | grafana | 3000 | 218 | | prometheus | 9090 | 219 | | prometheus-node-exporter | 9100 | 220 | 221 | Access a service (ex. Grafana) using the Onion Adress and the port, ex (**owgtuxw3dd2m2cyii5nzxk6bohzggragerdvzdsev6uhjyb3cfn2u5yd.onion:3000/**): 222 | 223 | ![ZNC dashboard](img/dashboard.png) 224 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /ansible/files/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [ 3 | { 4 | "name": "DS__VICTORIAMETRICS", 5 | "label": " VictoriaMetrics", 6 | "description": "", 7 | "type": "datasource", 8 | "pluginId": "prometheus", 9 | "pluginName": "Prometheus" 10 | } 11 | ], 12 | "__requires": [ 13 | { 14 | "type": "panel", 15 | "id": "bargauge", 16 | "name": "Bar gauge", 17 | "version": "" 18 | }, 19 | { 20 | "type": "grafana", 21 | "id": "grafana", 22 | "name": "Grafana", 23 | "version": "7.2.0" 24 | }, 25 | { 26 | "type": "panel", 27 | "id": "graph", 28 | "name": "Graph", 29 | "version": "" 30 | }, 31 | { 32 | "type": "datasource", 33 | "id": "prometheus", 34 | "name": "Prometheus", 35 | "version": "1.0.0" 36 | }, 37 | { 38 | "type": "panel", 39 | "id": "stat", 40 | "name": "Stat", 41 | "version": "" 42 | }, 43 | { 44 | "type": "panel", 45 | "id": "table-old", 46 | "name": "Table (old)", 47 | "version": "" 48 | } 49 | ], 50 | "annotations": { 51 | "list": [ 52 | { 53 | "$$hashKey": "object:2875", 54 | "builtIn": 1, 55 | "datasource": "-- Grafana --", 56 | "enable": true, 57 | "hide": true, 58 | "iconColor": "rgba(0, 211, 255, 1)", 59 | "name": "Annotations & Alerts", 60 | "type": "dashboard" 61 | } 62 | ] 63 | }, 64 | "description": "【English version】Update 2020.10.10, add the overall resource overview! Support Grafana6&7,Support Node Exporter v0.16 and above.Optimize the main metrics display. Includes: CPU, memory, disk IO, network, temperature and other monitoring metrics。https://github.com/starsliao/Prometheus", 65 | "editable": true, 66 | "gnetId": 11074, 67 | "graphTooltip": 0, 68 | "id": null, 69 | "iteration": 1602304673501, 70 | "links": [ 71 | { 72 | "$$hashKey": "object:2300", 73 | "icon": "bolt", 74 | "tags": [], 75 | "targetBlank": true, 76 | "title": "Update", 77 | "tooltip": "Update dashboard", 78 | "type": "link", 79 | "url": "https://grafana.com/grafana/dashboards/11074" 80 | }, 81 | { 82 | "$$hashKey": "object:2301", 83 | "icon": "question", 84 | "tags": [], 85 | "targetBlank": true, 86 | "title": "GitHub", 87 | "tooltip": "more dashboard", 88 | "type": "link", 89 | "url": "https://github.com/starsliao" 90 | }, 91 | { 92 | "$$hashKey": "object:2302", 93 | "asDropdown": true, 94 | "icon": "external link", 95 | "tags": [], 96 | "targetBlank": true, 97 | "title": "", 98 | "type": "dashboards" 99 | } 100 | ], 101 | "panels": [ 102 | { 103 | "collapsed": false, 104 | "datasource": "${DS__VICTORIAMETRICS}", 105 | "gridPos": { 106 | "h": 1, 107 | "w": 24, 108 | "x": 0, 109 | "y": 0 110 | }, 111 | "id": 187, 112 | "panels": [], 113 | "title": "Resource Overview (associated JOB),Host:$show_hostname,Instance:$node", 114 | "type": "row" 115 | }, 116 | { 117 | "columns": [], 118 | "datasource": "${DS__VICTORIAMETRICS}", 119 | "description": "Partition utilization, disk read, disk write, download bandwidth, upload bandwidth, if there are multiple network cards or multiple partitions, it is the value of the network card or partition with the highest utilization rate collected.\n\nCurrEstab: The number of TCP connections whose current status is ESTABLISHED or CLOSE-WAIT.", 120 | "fieldConfig": { 121 | "defaults": { 122 | "custom": {} 123 | }, 124 | "overrides": [] 125 | }, 126 | "fontSize": "80%", 127 | "gridPos": { 128 | "h": 7, 129 | "w": 24, 130 | "x": 0, 131 | "y": 1 132 | }, 133 | "id": 185, 134 | "pageSize": null, 135 | "showHeader": true, 136 | "sort": { 137 | "col": 31, 138 | "desc": false 139 | }, 140 | "styles": [ 141 | { 142 | "$$hashKey": "object:1600", 143 | "alias": "Hostname", 144 | "align": "auto", 145 | "colorMode": null, 146 | "colors": [ 147 | "rgba(245, 54, 54, 0.9)", 148 | "rgba(237, 129, 40, 0.89)", 149 | "rgba(50, 172, 45, 0.97)" 150 | ], 151 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 152 | "decimals": 1, 153 | "link": false, 154 | "linkTooltip": "", 155 | "linkUrl": "", 156 | "mappingType": 1, 157 | "pattern": "nodename", 158 | "thresholds": [], 159 | "type": "string", 160 | "unit": "bytes" 161 | }, 162 | { 163 | "$$hashKey": "object:1601", 164 | "alias": "IP(Link to details)", 165 | "align": "auto", 166 | "colorMode": null, 167 | "colors": [ 168 | "rgba(245, 54, 54, 0.9)", 169 | "rgba(237, 129, 40, 0.89)", 170 | "rgba(50, 172, 45, 0.97)" 171 | ], 172 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 173 | "decimals": 2, 174 | "link": true, 175 | "linkTargetBlank": false, 176 | "linkTooltip": "Browse host details", 177 | "linkUrl": "d/xfpJB9FGz/node-exporter?orgId=1&var-job=${job}&var-hostname=All&var-node=${__cell}&var-device=All&var-origin_prometheus=$origin_prometheus", 178 | "mappingType": 1, 179 | "pattern": "instance", 180 | "thresholds": [], 181 | "type": "number", 182 | "unit": "short" 183 | }, 184 | { 185 | "$$hashKey": "object:1602", 186 | "alias": "Memory", 187 | "align": "auto", 188 | "colorMode": null, 189 | "colors": [ 190 | "rgba(245, 54, 54, 0.9)", 191 | "rgba(237, 129, 40, 0.89)", 192 | "rgba(50, 172, 45, 0.97)" 193 | ], 194 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 195 | "decimals": 2, 196 | "link": false, 197 | "mappingType": 1, 198 | "pattern": "Value #B", 199 | "thresholds": [], 200 | "type": "number", 201 | "unit": "bytes" 202 | }, 203 | { 204 | "$$hashKey": "object:1603", 205 | "alias": "CPU Cores", 206 | "align": "auto", 207 | "colorMode": null, 208 | "colors": [ 209 | "rgba(245, 54, 54, 0.9)", 210 | "rgba(237, 129, 40, 0.89)", 211 | "rgba(50, 172, 45, 0.97)" 212 | ], 213 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 214 | "decimals": null, 215 | "mappingType": 1, 216 | "pattern": "Value #C", 217 | "thresholds": [], 218 | "type": "number", 219 | "unit": "short" 220 | }, 221 | { 222 | "$$hashKey": "object:1604", 223 | "alias": " Uptime", 224 | "align": "auto", 225 | "colorMode": null, 226 | "colors": [ 227 | "rgba(245, 54, 54, 0.9)", 228 | "rgba(237, 129, 40, 0.89)", 229 | "rgba(50, 172, 45, 0.97)" 230 | ], 231 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 232 | "decimals": 2, 233 | "mappingType": 1, 234 | "pattern": "Value #D", 235 | "thresholds": [], 236 | "type": "number", 237 | "unit": "s" 238 | }, 239 | { 240 | "$$hashKey": "object:1605", 241 | "alias": "Partition used%*", 242 | "align": "auto", 243 | "colorMode": "cell", 244 | "colors": [ 245 | "rgba(50, 172, 45, 0.97)", 246 | "rgba(237, 129, 40, 0.89)", 247 | "rgba(245, 54, 54, 0.9)" 248 | ], 249 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 250 | "decimals": 2, 251 | "mappingType": 1, 252 | "pattern": "Value #E", 253 | "thresholds": [ 254 | "70", 255 | "85" 256 | ], 257 | "type": "number", 258 | "unit": "percent" 259 | }, 260 | { 261 | "$$hashKey": "object:1606", 262 | "alias": "CPU used%", 263 | "align": "auto", 264 | "colorMode": "cell", 265 | "colors": [ 266 | "rgba(50, 172, 45, 0.97)", 267 | "rgba(237, 129, 40, 0.89)", 268 | "rgba(245, 54, 54, 0.9)" 269 | ], 270 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 271 | "decimals": 2, 272 | "mappingType": 1, 273 | "pattern": "Value #F", 274 | "thresholds": [ 275 | "70", 276 | "85" 277 | ], 278 | "type": "number", 279 | "unit": "percent" 280 | }, 281 | { 282 | "$$hashKey": "object:1607", 283 | "alias": "Memory used%", 284 | "align": "auto", 285 | "colorMode": "cell", 286 | "colors": [ 287 | "rgba(50, 172, 45, 0.97)", 288 | "rgba(237, 129, 40, 0.89)", 289 | "rgba(245, 54, 54, 0.9)" 290 | ], 291 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 292 | "decimals": 2, 293 | "mappingType": 1, 294 | "pattern": "Value #G", 295 | "thresholds": [ 296 | "70", 297 | "85" 298 | ], 299 | "type": "number", 300 | "unit": "percent" 301 | }, 302 | { 303 | "$$hashKey": "object:1608", 304 | "alias": "Disk read*", 305 | "align": "auto", 306 | "colorMode": "cell", 307 | "colors": [ 308 | "rgba(50, 172, 45, 0.97)", 309 | "rgba(237, 129, 40, 0.89)", 310 | "rgba(245, 54, 54, 0.9)" 311 | ], 312 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 313 | "decimals": 2, 314 | "mappingType": 1, 315 | "pattern": "Value #H", 316 | "thresholds": [ 317 | "10485760", 318 | "20485760" 319 | ], 320 | "type": "number", 321 | "unit": "Bps" 322 | }, 323 | { 324 | "$$hashKey": "object:1609", 325 | "alias": "Disk write*", 326 | "align": "auto", 327 | "colorMode": "cell", 328 | "colors": [ 329 | "rgba(50, 172, 45, 0.97)", 330 | "rgba(237, 129, 40, 0.89)", 331 | "rgba(245, 54, 54, 0.9)" 332 | ], 333 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 334 | "decimals": 2, 335 | "mappingType": 1, 336 | "pattern": "Value #I", 337 | "thresholds": [ 338 | "10485760", 339 | "20485760" 340 | ], 341 | "type": "number", 342 | "unit": "Bps" 343 | }, 344 | { 345 | "$$hashKey": "object:1610", 346 | "alias": "Download*", 347 | "align": "auto", 348 | "colorMode": "cell", 349 | "colors": [ 350 | "rgba(50, 172, 45, 0.97)", 351 | "rgba(237, 129, 40, 0.89)", 352 | "rgba(245, 54, 54, 0.9)" 353 | ], 354 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 355 | "decimals": 2, 356 | "mappingType": 1, 357 | "pattern": "Value #J", 358 | "thresholds": [ 359 | "30485760", 360 | "104857600" 361 | ], 362 | "type": "number", 363 | "unit": "bps" 364 | }, 365 | { 366 | "$$hashKey": "object:1611", 367 | "alias": "Upload*", 368 | "align": "auto", 369 | "colorMode": "cell", 370 | "colors": [ 371 | "rgba(50, 172, 45, 0.97)", 372 | "rgba(237, 129, 40, 0.89)", 373 | "rgba(245, 54, 54, 0.9)" 374 | ], 375 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 376 | "decimals": 2, 377 | "mappingType": 1, 378 | "pattern": "Value #K", 379 | "thresholds": [ 380 | "30485760", 381 | "104857600" 382 | ], 383 | "type": "number", 384 | "unit": "bps" 385 | }, 386 | { 387 | "$$hashKey": "object:1612", 388 | "alias": "5m load", 389 | "align": "auto", 390 | "colorMode": null, 391 | "colors": [ 392 | "rgba(245, 54, 54, 0.9)", 393 | "rgba(237, 129, 40, 0.89)", 394 | "rgba(50, 172, 45, 0.97)" 395 | ], 396 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 397 | "decimals": 2, 398 | "mappingType": 1, 399 | "pattern": "Value #L", 400 | "thresholds": [], 401 | "type": "number", 402 | "unit": "short" 403 | }, 404 | { 405 | "$$hashKey": "object:1613", 406 | "alias": "CurrEstab", 407 | "align": "auto", 408 | "colorMode": "cell", 409 | "colors": [ 410 | "rgba(50, 172, 45, 0.97)", 411 | "rgba(237, 129, 40, 0.89)", 412 | "rgba(245, 54, 54, 0.9)" 413 | ], 414 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 415 | "decimals": 2, 416 | "mappingType": 1, 417 | "pattern": "Value #M", 418 | "thresholds": [ 419 | "1000", 420 | "1500" 421 | ], 422 | "type": "string", 423 | "unit": "short" 424 | }, 425 | { 426 | "$$hashKey": "object:1614", 427 | "alias": "TCP_tw", 428 | "align": "center", 429 | "colorMode": "cell", 430 | "colors": [ 431 | "rgba(50, 172, 45, 0.97)", 432 | "rgba(237, 129, 40, 0.89)", 433 | "rgba(245, 54, 54, 0.9)" 434 | ], 435 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 436 | "decimals": null, 437 | "mappingType": 1, 438 | "pattern": "Value #N", 439 | "thresholds": [ 440 | "5000", 441 | "20000" 442 | ], 443 | "type": "number", 444 | "unit": "short" 445 | }, 446 | { 447 | "$$hashKey": "object:1615", 448 | "alias": "", 449 | "align": "right", 450 | "colorMode": null, 451 | "colors": [ 452 | "rgba(245, 54, 54, 0.9)", 453 | "rgba(237, 129, 40, 0.89)", 454 | "rgba(50, 172, 45, 0.97)" 455 | ], 456 | "decimals": 2, 457 | "pattern": "/.*/", 458 | "thresholds": [], 459 | "type": "hidden", 460 | "unit": "short" 461 | } 462 | ], 463 | "targets": [ 464 | { 465 | "expr": "node_uname_info{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} - 0", 466 | "format": "table", 467 | "instant": true, 468 | "interval": "", 469 | "legendFormat": "主机名", 470 | "refId": "A" 471 | }, 472 | { 473 | "expr": "sum(time() - node_boot_time_seconds{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"})by(instance)", 474 | "format": "table", 475 | "hide": false, 476 | "instant": true, 477 | "interval": "", 478 | "legendFormat": "运行时间", 479 | "refId": "D" 480 | }, 481 | { 482 | "expr": "node_memory_MemTotal_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} - 0", 483 | "format": "table", 484 | "hide": false, 485 | "instant": true, 486 | "interval": "", 487 | "legendFormat": "总内存", 488 | "refId": "B" 489 | }, 490 | { 491 | "expr": "count(node_cpu_seconds_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",mode='system'}) by (instance)", 492 | "format": "table", 493 | "hide": false, 494 | "instant": true, 495 | "interval": "", 496 | "legendFormat": "总核数", 497 | "refId": "C" 498 | }, 499 | { 500 | "expr": "node_load5{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}", 501 | "format": "table", 502 | "instant": true, 503 | "interval": "", 504 | "legendFormat": "5分钟负载", 505 | "refId": "L" 506 | }, 507 | { 508 | "expr": "(1 - avg(rate(node_cpu_seconds_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",mode=\"idle\"}[$interval])) by (instance)) * 100", 509 | "format": "table", 510 | "hide": false, 511 | "instant": true, 512 | "interval": "", 513 | "legendFormat": "CPU使用率", 514 | "refId": "F" 515 | }, 516 | { 517 | "expr": "(1 - (node_memory_MemAvailable_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} / (node_memory_MemTotal_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"})))* 100", 518 | "format": "table", 519 | "hide": false, 520 | "instant": true, 521 | "interval": "", 522 | "legendFormat": "内存使用率", 523 | "refId": "G" 524 | }, 525 | { 526 | "expr": "max((node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"ext.?|xfs\"}-node_filesystem_free_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"ext.?|xfs\"}) *100/(node_filesystem_avail_bytes {origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"ext.?|xfs\"}+(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"ext.?|xfs\"}-node_filesystem_free_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"ext.?|xfs\"})))by(instance)", 527 | "format": "table", 528 | "hide": false, 529 | "instant": true, 530 | "interval": "", 531 | "legendFormat": "分区使用率", 532 | "refId": "E" 533 | }, 534 | { 535 | "expr": "max(rate(node_disk_read_bytes_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}[$interval])) by (instance)", 536 | "format": "table", 537 | "hide": false, 538 | "instant": true, 539 | "interval": "", 540 | "legendFormat": "最大读取", 541 | "refId": "H" 542 | }, 543 | { 544 | "expr": "max(rate(node_disk_written_bytes_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}[$interval])) by (instance)", 545 | "format": "table", 546 | "hide": false, 547 | "instant": true, 548 | "interval": "", 549 | "legendFormat": "最大写入", 550 | "refId": "I" 551 | }, 552 | { 553 | "expr": "node_netstat_Tcp_CurrEstab{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} - 0", 554 | "format": "table", 555 | "hide": false, 556 | "instant": true, 557 | "interval": "", 558 | "legendFormat": "连接数", 559 | "refId": "M" 560 | }, 561 | { 562 | "expr": "node_sockstat_TCP_tw{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} - 0", 563 | "format": "table", 564 | "hide": false, 565 | "instant": true, 566 | "interval": "", 567 | "legendFormat": "TIME_WAIT", 568 | "refId": "N" 569 | }, 570 | { 571 | "expr": "max(rate(node_network_receive_bytes_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}[$interval])*8) by (instance)", 572 | "format": "table", 573 | "hide": false, 574 | "instant": true, 575 | "interval": "", 576 | "legendFormat": "下载带宽", 577 | "refId": "J" 578 | }, 579 | { 580 | "expr": "max(rate(node_network_transmit_bytes_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}[$interval])*8) by (instance)", 581 | "format": "table", 582 | "hide": false, 583 | "instant": true, 584 | "interval": "", 585 | "legendFormat": "上传带宽", 586 | "refId": "K" 587 | } 588 | ], 589 | "timeFrom": null, 590 | "timeShift": null, 591 | "title": "Server Resource Overview【JOB:$job,Total:$total】", 592 | "transform": "table", 593 | "type": "table-old" 594 | }, 595 | { 596 | "aliasColors": { 597 | "192.168.200.241:9100_Total": "dark-red", 598 | "Idle - Waiting for something to happen": "#052B51", 599 | "guest": "#9AC48A", 600 | "idle": "#052B51", 601 | "iowait": "#EAB839", 602 | "irq": "#BF1B00", 603 | "nice": "#C15C17", 604 | "sdb_每秒I/O操作%": "#d683ce", 605 | "softirq": "#E24D42", 606 | "steal": "#FCE2DE", 607 | "system": "#508642", 608 | "user": "#5195CE", 609 | "磁盘花费在I/O操作占比": "#ba43a9" 610 | }, 611 | "bars": false, 612 | "dashLength": 10, 613 | "dashes": false, 614 | "datasource": "${DS__VICTORIAMETRICS}", 615 | "decimals": null, 616 | "description": "", 617 | "fieldConfig": { 618 | "defaults": { 619 | "custom": {}, 620 | "links": [] 621 | }, 622 | "overrides": [] 623 | }, 624 | "fill": 0, 625 | "fillGradient": 0, 626 | "gridPos": { 627 | "h": 7, 628 | "w": 8, 629 | "x": 0, 630 | "y": 8 631 | }, 632 | "hiddenSeries": false, 633 | "id": 191, 634 | "legend": { 635 | "alignAsTable": false, 636 | "avg": false, 637 | "current": true, 638 | "hideEmpty": true, 639 | "hideZero": true, 640 | "max": false, 641 | "min": false, 642 | "rightSide": false, 643 | "show": true, 644 | "sideWidth": null, 645 | "sort": "current", 646 | "sortDesc": true, 647 | "total": false, 648 | "values": true 649 | }, 650 | "lines": true, 651 | "linewidth": 2, 652 | "links": [], 653 | "maxPerRow": 6, 654 | "nullPointMode": "null", 655 | "options": { 656 | "alertThreshold": true 657 | }, 658 | "percentage": false, 659 | "pluginVersion": "7.2.0", 660 | "pointradius": 5, 661 | "points": false, 662 | "renderer": "flot", 663 | "repeat": null, 664 | "seriesOverrides": [ 665 | { 666 | "$$hashKey": "object:2312", 667 | "alias": "Overall average used%", 668 | "lines": false, 669 | "pointradius": 1, 670 | "points": true, 671 | "yaxis": 2 672 | }, 673 | { 674 | "$$hashKey": "object:2313", 675 | "alias": "CPU Cores", 676 | "color": "#C4162A" 677 | } 678 | ], 679 | "spaceLength": 10, 680 | "stack": false, 681 | "steppedLine": false, 682 | "targets": [ 683 | { 684 | "expr": "count(node_cpu_seconds_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\", mode='system'})", 685 | "format": "time_series", 686 | "hide": false, 687 | "instant": false, 688 | "interval": "30m", 689 | "intervalFactor": 1, 690 | "legendFormat": "CPU Cores", 691 | "refId": "B", 692 | "step": 240 693 | }, 694 | { 695 | "expr": "sum(node_load5{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"})", 696 | "format": "time_series", 697 | "hide": false, 698 | "interval": "30m", 699 | "intervalFactor": 1, 700 | "legendFormat": "Total 5m load", 701 | "refId": "A", 702 | "step": 240 703 | }, 704 | { 705 | "expr": "avg(1 - avg(rate(node_cpu_seconds_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",mode=\"idle\"}[$interval])) by (instance)) * 100", 706 | "format": "time_series", 707 | "hide": false, 708 | "interval": "30m", 709 | "intervalFactor": 1, 710 | "legendFormat": "Overall average used%", 711 | "refId": "F", 712 | "step": 240 713 | } 714 | ], 715 | "thresholds": [], 716 | "timeFrom": null, 717 | "timeRegions": [], 718 | "timeShift": null, 719 | "title": "$job:Overall total 5m load & average CPU used%", 720 | "tooltip": { 721 | "shared": true, 722 | "sort": 2, 723 | "value_type": "individual" 724 | }, 725 | "type": "graph", 726 | "xaxis": { 727 | "buckets": null, 728 | "mode": "time", 729 | "name": null, 730 | "show": true, 731 | "values": [] 732 | }, 733 | "yaxes": [ 734 | { 735 | "$$hashKey": "object:8791", 736 | "decimals": null, 737 | "format": "short", 738 | "label": "Total 5m load", 739 | "logBase": 1, 740 | "max": null, 741 | "min": null, 742 | "show": true 743 | }, 744 | { 745 | "$$hashKey": "object:8792", 746 | "decimals": 0, 747 | "format": "percent", 748 | "label": "Overall average used%", 749 | "logBase": 1, 750 | "max": null, 751 | "min": null, 752 | "show": true 753 | } 754 | ], 755 | "yaxis": { 756 | "align": false, 757 | "alignLevel": null 758 | } 759 | }, 760 | { 761 | "aliasColors": { 762 | "192.168.200.241:9100_总内存": "dark-red", 763 | "内存_Avaliable": "#6ED0E0", 764 | "内存_Cached": "#EF843C", 765 | "内存_Free": "#629E51", 766 | "内存_Total": "#6d1f62", 767 | "内存_Used": "#eab839", 768 | "可用": "#9ac48a", 769 | "总内存": "#bf1b00" 770 | }, 771 | "bars": false, 772 | "dashLength": 10, 773 | "dashes": false, 774 | "datasource": "${DS__VICTORIAMETRICS}", 775 | "decimals": 1, 776 | "fieldConfig": { 777 | "defaults": { 778 | "custom": {}, 779 | "links": [] 780 | }, 781 | "overrides": [] 782 | }, 783 | "fill": 0, 784 | "fillGradient": 0, 785 | "gridPos": { 786 | "h": 7, 787 | "w": 8, 788 | "x": 8, 789 | "y": 8 790 | }, 791 | "height": "300", 792 | "hiddenSeries": false, 793 | "id": 195, 794 | "legend": { 795 | "alignAsTable": false, 796 | "avg": false, 797 | "current": true, 798 | "max": false, 799 | "min": false, 800 | "rightSide": false, 801 | "show": true, 802 | "sort": "current", 803 | "sortDesc": false, 804 | "total": false, 805 | "values": true 806 | }, 807 | "lines": true, 808 | "linewidth": 2, 809 | "links": [], 810 | "nullPointMode": "null", 811 | "options": { 812 | "alertThreshold": true 813 | }, 814 | "percentage": false, 815 | "pluginVersion": "7.2.0", 816 | "pointradius": 5, 817 | "points": false, 818 | "renderer": "flot", 819 | "seriesOverrides": [ 820 | { 821 | "$$hashKey": "object:2494", 822 | "alias": "Total", 823 | "color": "#C4162A", 824 | "fill": 0 825 | }, 826 | { 827 | "$$hashKey": "object:2495", 828 | "alias": "Overall Average Used%", 829 | "lines": false, 830 | "pointradius": 1, 831 | "points": true, 832 | "yaxis": 2 833 | } 834 | ], 835 | "spaceLength": 10, 836 | "stack": false, 837 | "steppedLine": false, 838 | "targets": [ 839 | { 840 | "expr": "sum(node_memory_MemTotal_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"})", 841 | "format": "time_series", 842 | "hide": false, 843 | "instant": false, 844 | "interval": "30m", 845 | "intervalFactor": 1, 846 | "legendFormat": "Total", 847 | "refId": "A", 848 | "step": 4 849 | }, 850 | { 851 | "expr": "sum(node_memory_MemTotal_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} - node_memory_MemAvailable_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"})", 852 | "format": "time_series", 853 | "hide": false, 854 | "interval": "30m", 855 | "intervalFactor": 1, 856 | "legendFormat": "Total Used", 857 | "refId": "B", 858 | "step": 4 859 | }, 860 | { 861 | "expr": "(sum(node_memory_MemTotal_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} - node_memory_MemAvailable_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}) / sum(node_memory_MemTotal_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}))*100", 862 | "format": "time_series", 863 | "hide": false, 864 | "interval": "30m", 865 | "intervalFactor": 1, 866 | "legendFormat": "Overall Average Used%", 867 | "refId": "H" 868 | } 869 | ], 870 | "thresholds": [], 871 | "timeFrom": null, 872 | "timeRegions": [], 873 | "timeShift": null, 874 | "title": "$job:Overall total memory & average memory used%", 875 | "tooltip": { 876 | "shared": true, 877 | "sort": 2, 878 | "value_type": "individual" 879 | }, 880 | "type": "graph", 881 | "xaxis": { 882 | "buckets": null, 883 | "mode": "time", 884 | "name": null, 885 | "show": true, 886 | "values": [] 887 | }, 888 | "yaxes": [ 889 | { 890 | "$$hashKey": "object:8938", 891 | "decimals": null, 892 | "format": "bytes", 893 | "label": "Total", 894 | "logBase": 1, 895 | "max": null, 896 | "min": "0", 897 | "show": true 898 | }, 899 | { 900 | "$$hashKey": "object:8939", 901 | "decimals": null, 902 | "format": "percent", 903 | "label": "Overall Average Used%", 904 | "logBase": 1, 905 | "max": null, 906 | "min": null, 907 | "show": true 908 | } 909 | ], 910 | "yaxis": { 911 | "align": false, 912 | "alignLevel": null 913 | } 914 | }, 915 | { 916 | "aliasColors": {}, 917 | "bars": false, 918 | "dashLength": 10, 919 | "dashes": false, 920 | "datasource": "${DS__VICTORIAMETRICS}", 921 | "decimals": 1, 922 | "description": "", 923 | "fieldConfig": { 924 | "defaults": { 925 | "custom": {}, 926 | "links": [] 927 | }, 928 | "overrides": [] 929 | }, 930 | "fill": 0, 931 | "fillGradient": 0, 932 | "gridPos": { 933 | "h": 7, 934 | "w": 8, 935 | "x": 16, 936 | "y": 8 937 | }, 938 | "hiddenSeries": false, 939 | "id": 197, 940 | "legend": { 941 | "alignAsTable": false, 942 | "avg": false, 943 | "current": true, 944 | "hideEmpty": false, 945 | "hideZero": false, 946 | "max": false, 947 | "min": false, 948 | "rightSide": false, 949 | "show": true, 950 | "sideWidth": null, 951 | "sort": "current", 952 | "sortDesc": true, 953 | "total": false, 954 | "values": true 955 | }, 956 | "lines": true, 957 | "linewidth": 2, 958 | "links": [], 959 | "nullPointMode": "null", 960 | "options": { 961 | "alertThreshold": true 962 | }, 963 | "percentage": false, 964 | "pluginVersion": "7.2.0", 965 | "pointradius": 5, 966 | "points": false, 967 | "renderer": "flot", 968 | "seriesOverrides": [ 969 | { 970 | "$$hashKey": "object:2617", 971 | "alias": "Overall Average Used%", 972 | "lines": false, 973 | "pointradius": 1, 974 | "points": true, 975 | "yaxis": 2 976 | }, 977 | { 978 | "$$hashKey": "object:2618", 979 | "alias": "Total", 980 | "color": "#C4162A" 981 | } 982 | ], 983 | "spaceLength": 10, 984 | "stack": false, 985 | "steppedLine": false, 986 | "targets": [ 987 | { 988 | "expr": "sum(avg(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance))", 989 | "format": "time_series", 990 | "instant": false, 991 | "interval": "30m", 992 | "intervalFactor": 1, 993 | "legendFormat": "Total", 994 | "refId": "E" 995 | }, 996 | { 997 | "expr": "sum(avg(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance)) - sum(avg(node_filesystem_free_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance))", 998 | "format": "time_series", 999 | "instant": false, 1000 | "interval": "30m", 1001 | "intervalFactor": 1, 1002 | "legendFormat": "Total Used", 1003 | "refId": "C" 1004 | }, 1005 | { 1006 | "expr": "(sum(avg(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance)) - sum(avg(node_filesystem_free_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance))) *100/(sum(avg(node_filesystem_avail_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance))+(sum(avg(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance)) - sum(avg(node_filesystem_free_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance))))", 1007 | "format": "time_series", 1008 | "instant": false, 1009 | "interval": "30m", 1010 | "intervalFactor": 1, 1011 | "legendFormat": "Overall Average Used%", 1012 | "refId": "A" 1013 | } 1014 | ], 1015 | "thresholds": [], 1016 | "timeFrom": null, 1017 | "timeRegions": [], 1018 | "timeShift": null, 1019 | "title": "$job:Overall total disk & average disk used%", 1020 | "tooltip": { 1021 | "shared": true, 1022 | "sort": 2, 1023 | "value_type": "individual" 1024 | }, 1025 | "type": "graph", 1026 | "xaxis": { 1027 | "buckets": null, 1028 | "mode": "time", 1029 | "name": null, 1030 | "show": true, 1031 | "values": [] 1032 | }, 1033 | "yaxes": [ 1034 | { 1035 | "$$hashKey": "object:8990", 1036 | "decimals": 1, 1037 | "format": "bytes", 1038 | "label": "Total", 1039 | "logBase": 1, 1040 | "max": null, 1041 | "min": "0", 1042 | "show": true 1043 | }, 1044 | { 1045 | "$$hashKey": "object:8991", 1046 | "decimals": null, 1047 | "format": "percent", 1048 | "label": "Overall Average Used%", 1049 | "logBase": 1, 1050 | "max": null, 1051 | "min": null, 1052 | "show": true 1053 | } 1054 | ], 1055 | "yaxis": { 1056 | "align": false, 1057 | "alignLevel": null 1058 | } 1059 | }, 1060 | { 1061 | "collapsed": false, 1062 | "datasource": "${DS__VICTORIAMETRICS}", 1063 | "gridPos": { 1064 | "h": 1, 1065 | "w": 24, 1066 | "x": 0, 1067 | "y": 15 1068 | }, 1069 | "id": 189, 1070 | "panels": [], 1071 | "title": "Resource Details:【$show_hostname】", 1072 | "type": "row" 1073 | }, 1074 | { 1075 | "cacheTimeout": null, 1076 | "datasource": "${DS__VICTORIAMETRICS}", 1077 | "description": "", 1078 | "fieldConfig": { 1079 | "defaults": { 1080 | "custom": {}, 1081 | "decimals": 0, 1082 | "mappings": [ 1083 | { 1084 | "id": 0, 1085 | "op": "=", 1086 | "text": "N/A", 1087 | "type": 1, 1088 | "value": "null" 1089 | } 1090 | ], 1091 | "nullValueMode": "null", 1092 | "thresholds": { 1093 | "mode": "absolute", 1094 | "steps": [ 1095 | { 1096 | "color": "rgba(245, 54, 54, 0.9)", 1097 | "value": null 1098 | }, 1099 | { 1100 | "color": "rgba(237, 129, 40, 0.89)", 1101 | "value": 1 1102 | }, 1103 | { 1104 | "color": "rgba(50, 172, 45, 0.97)", 1105 | "value": 3 1106 | } 1107 | ] 1108 | }, 1109 | "unit": "s" 1110 | }, 1111 | "overrides": [] 1112 | }, 1113 | "gridPos": { 1114 | "h": 2, 1115 | "w": 2, 1116 | "x": 0, 1117 | "y": 16 1118 | }, 1119 | "hideTimeOverride": true, 1120 | "id": 15, 1121 | "interval": null, 1122 | "links": [], 1123 | "maxDataPoints": 100, 1124 | "options": { 1125 | "colorMode": "value", 1126 | "graphMode": "none", 1127 | "justifyMode": "auto", 1128 | "orientation": "horizontal", 1129 | "reduceOptions": { 1130 | "calcs": [ 1131 | "lastNotNull" 1132 | ], 1133 | "fields": "", 1134 | "values": false 1135 | }, 1136 | "textMode": "auto" 1137 | }, 1138 | "pluginVersion": "7.2.0", 1139 | "targets": [ 1140 | { 1141 | "expr": "avg(time() - node_boot_time_seconds{instance=~\"$node\"})", 1142 | "format": "time_series", 1143 | "hide": false, 1144 | "instant": true, 1145 | "interval": "", 1146 | "intervalFactor": 1, 1147 | "legendFormat": "", 1148 | "refId": "A", 1149 | "step": 40 1150 | } 1151 | ], 1152 | "title": "Uptime", 1153 | "type": "stat" 1154 | }, 1155 | { 1156 | "datasource": "${DS__VICTORIAMETRICS}", 1157 | "fieldConfig": { 1158 | "defaults": { 1159 | "color": { 1160 | "mode": "thresholds" 1161 | }, 1162 | "custom": {}, 1163 | "decimals": 1, 1164 | "mappings": [ 1165 | { 1166 | "from": "", 1167 | "id": 1, 1168 | "operator": "", 1169 | "text": "N/A", 1170 | "to": "", 1171 | "type": 1, 1172 | "value": "0" 1173 | } 1174 | ], 1175 | "max": 100, 1176 | "min": 0.1, 1177 | "thresholds": { 1178 | "mode": "absolute", 1179 | "steps": [ 1180 | { 1181 | "color": "green", 1182 | "value": null 1183 | }, 1184 | { 1185 | "color": "#EAB839", 1186 | "value": 70 1187 | }, 1188 | { 1189 | "color": "red", 1190 | "value": 90 1191 | } 1192 | ] 1193 | }, 1194 | "unit": "percent" 1195 | }, 1196 | "overrides": [] 1197 | }, 1198 | "gridPos": { 1199 | "h": 6, 1200 | "w": 3, 1201 | "x": 2, 1202 | "y": 16 1203 | }, 1204 | "id": 177, 1205 | "options": { 1206 | "displayMode": "lcd", 1207 | "orientation": "horizontal", 1208 | "reduceOptions": { 1209 | "calcs": [ 1210 | "last" 1211 | ], 1212 | "fields": "", 1213 | "values": false 1214 | }, 1215 | "showUnfilled": true 1216 | }, 1217 | "pluginVersion": "7.2.0", 1218 | "targets": [ 1219 | { 1220 | "expr": "100 - (avg(rate(node_cpu_seconds_total{instance=~\"$node\",mode=\"idle\"}[$interval])) * 100)", 1221 | "instant": true, 1222 | "interval": "", 1223 | "legendFormat": "CPU Busy", 1224 | "refId": "A" 1225 | }, 1226 | { 1227 | "expr": "avg(rate(node_cpu_seconds_total{instance=~\"$node\",mode=\"iowait\"}[$interval])) * 100", 1228 | "hide": true, 1229 | "instant": true, 1230 | "interval": "", 1231 | "legendFormat": "IOwait使用率", 1232 | "refId": "C" 1233 | }, 1234 | { 1235 | "expr": "(1 - (node_memory_MemAvailable_bytes{instance=~\"$node\"} / (node_memory_MemTotal_bytes{instance=~\"$node\"})))* 100", 1236 | "instant": true, 1237 | "interval": "", 1238 | "legendFormat": "Used RAM Memory", 1239 | "refId": "B" 1240 | }, 1241 | { 1242 | "expr": "(node_filesystem_size_bytes{instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint=\"$maxmount\"}-node_filesystem_free_bytes{instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint=\"$maxmount\"})*100 /(node_filesystem_avail_bytes {instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint=\"$maxmount\"}+(node_filesystem_size_bytes{instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint=\"$maxmount\"}-node_filesystem_free_bytes{instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint=\"$maxmount\"}))", 1243 | "hide": false, 1244 | "instant": true, 1245 | "interval": "", 1246 | "legendFormat": "Used Max Mount($maxmount)", 1247 | "refId": "D" 1248 | }, 1249 | { 1250 | "expr": "(1 - ((node_memory_SwapFree_bytes{instance=~\"$node\"} + 1)/ (node_memory_SwapTotal_bytes{instance=~\"$node\"} + 1))) * 100", 1251 | "instant": true, 1252 | "interval": "", 1253 | "legendFormat": "Used SWAP", 1254 | "refId": "F" 1255 | } 1256 | ], 1257 | "timeFrom": null, 1258 | "timeShift": null, 1259 | "title": "", 1260 | "transformations": [], 1261 | "type": "bargauge" 1262 | }, 1263 | { 1264 | "columns": [], 1265 | "datasource": "${DS__VICTORIAMETRICS}", 1266 | "description": "In this kanban: the total disk, usage, available, and usage rate are consistent with the values of the Size, Used, Avail, and Use% columns of the df command, and the value of Use% will be rounded to one decimal place, which will be more accurate .\n\nNote: The Use% algorithm in df is: (size-free) * 100 / (avail + (size-free)), the result is divisible by this value, non-divisible by this value is +1, and the unit of the result is %.\nRefer to the df command source code:", 1267 | "fieldConfig": { 1268 | "defaults": { 1269 | "custom": {} 1270 | }, 1271 | "overrides": [] 1272 | }, 1273 | "fontSize": "80%", 1274 | "gridPos": { 1275 | "h": 6, 1276 | "w": 10, 1277 | "x": 5, 1278 | "y": 16 1279 | }, 1280 | "id": 181, 1281 | "links": [ 1282 | { 1283 | "targetBlank": true, 1284 | "title": "https://github.com/coreutils/coreutils/blob/master/src/df.c", 1285 | "url": "https://github.com/coreutils/coreutils/blob/master/src/df.c" 1286 | } 1287 | ], 1288 | "pageSize": null, 1289 | "scroll": true, 1290 | "showHeader": true, 1291 | "sort": { 1292 | "col": 6, 1293 | "desc": false 1294 | }, 1295 | "styles": [ 1296 | { 1297 | "$$hashKey": "object:307", 1298 | "alias": "Mounted on", 1299 | "align": "auto", 1300 | "colorMode": null, 1301 | "colors": [ 1302 | "rgba(50, 172, 45, 0.97)", 1303 | "rgba(237, 129, 40, 0.89)", 1304 | "rgba(245, 54, 54, 0.9)" 1305 | ], 1306 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1307 | "decimals": 2, 1308 | "mappingType": 1, 1309 | "pattern": "mountpoint", 1310 | "thresholds": [ 1311 | "" 1312 | ], 1313 | "type": "string", 1314 | "unit": "bytes" 1315 | }, 1316 | { 1317 | "$$hashKey": "object:308", 1318 | "alias": "Avail", 1319 | "align": "auto", 1320 | "colorMode": "value", 1321 | "colors": [ 1322 | "rgba(245, 54, 54, 0.9)", 1323 | "rgba(237, 129, 40, 0.89)", 1324 | "rgba(50, 172, 45, 0.97)" 1325 | ], 1326 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1327 | "decimals": 1, 1328 | "mappingType": 1, 1329 | "pattern": "Value #A", 1330 | "thresholds": [ 1331 | "10000000000", 1332 | "20000000000" 1333 | ], 1334 | "type": "number", 1335 | "unit": "bytes" 1336 | }, 1337 | { 1338 | "$$hashKey": "object:309", 1339 | "alias": "Used", 1340 | "align": "auto", 1341 | "colorMode": "cell", 1342 | "colors": [ 1343 | "rgba(50, 172, 45, 0.97)", 1344 | "rgba(237, 129, 40, 0.89)", 1345 | "rgba(245, 54, 54, 0.9)" 1346 | ], 1347 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1348 | "decimals": 1, 1349 | "mappingType": 1, 1350 | "pattern": "Value #B", 1351 | "thresholds": [ 1352 | "70", 1353 | "85" 1354 | ], 1355 | "type": "number", 1356 | "unit": "percent" 1357 | }, 1358 | { 1359 | "$$hashKey": "object:310", 1360 | "alias": "Size", 1361 | "align": "auto", 1362 | "colorMode": null, 1363 | "colors": [ 1364 | "rgba(245, 54, 54, 0.9)", 1365 | "rgba(237, 129, 40, 0.89)", 1366 | "rgba(50, 172, 45, 0.97)" 1367 | ], 1368 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1369 | "decimals": 0, 1370 | "link": false, 1371 | "mappingType": 1, 1372 | "pattern": "Value #C", 1373 | "thresholds": [], 1374 | "type": "number", 1375 | "unit": "bytes" 1376 | }, 1377 | { 1378 | "$$hashKey": "object:311", 1379 | "alias": "Filesystem", 1380 | "align": "auto", 1381 | "colorMode": null, 1382 | "colors": [ 1383 | "rgba(245, 54, 54, 0.9)", 1384 | "rgba(237, 129, 40, 0.89)", 1385 | "rgba(50, 172, 45, 0.97)" 1386 | ], 1387 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1388 | "decimals": 2, 1389 | "link": false, 1390 | "mappingType": 1, 1391 | "pattern": "fstype", 1392 | "thresholds": [], 1393 | "type": "string", 1394 | "unit": "short" 1395 | }, 1396 | { 1397 | "$$hashKey": "object:312", 1398 | "alias": "Device", 1399 | "align": "auto", 1400 | "colorMode": null, 1401 | "colors": [ 1402 | "rgba(245, 54, 54, 0.9)", 1403 | "rgba(237, 129, 40, 0.89)", 1404 | "rgba(50, 172, 45, 0.97)" 1405 | ], 1406 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1407 | "decimals": 2, 1408 | "link": false, 1409 | "mappingType": 1, 1410 | "pattern": "device", 1411 | "preserveFormat": false, 1412 | "sanitize": false, 1413 | "thresholds": [], 1414 | "type": "string", 1415 | "unit": "short" 1416 | }, 1417 | { 1418 | "$$hashKey": "object:313", 1419 | "alias": "", 1420 | "align": "auto", 1421 | "colorMode": null, 1422 | "colors": [ 1423 | "rgba(245, 54, 54, 0.9)", 1424 | "rgba(237, 129, 40, 0.89)", 1425 | "rgba(50, 172, 45, 0.97)" 1426 | ], 1427 | "decimals": 2, 1428 | "pattern": "/.*/", 1429 | "preserveFormat": true, 1430 | "sanitize": false, 1431 | "thresholds": [], 1432 | "type": "hidden", 1433 | "unit": "short" 1434 | } 1435 | ], 1436 | "targets": [ 1437 | { 1438 | "expr": "node_filesystem_size_bytes{instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint !~\".*pod.*\"}-0", 1439 | "format": "table", 1440 | "hide": false, 1441 | "instant": true, 1442 | "interval": "", 1443 | "intervalFactor": 1, 1444 | "legendFormat": "总量", 1445 | "refId": "C" 1446 | }, 1447 | { 1448 | "expr": "node_filesystem_avail_bytes {instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint !~\".*pod.*\"}-0", 1449 | "format": "table", 1450 | "hide": false, 1451 | "instant": true, 1452 | "interval": "10s", 1453 | "intervalFactor": 1, 1454 | "legendFormat": "", 1455 | "refId": "A" 1456 | }, 1457 | { 1458 | "expr": "(node_filesystem_size_bytes{instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint !~\".*pod.*\"}-node_filesystem_free_bytes{instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint !~\".*pod.*\"}) *100/(node_filesystem_avail_bytes {instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint !~\".*pod.*\"}+(node_filesystem_size_bytes{instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint !~\".*pod.*\"}-node_filesystem_free_bytes{instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint !~\".*pod.*\"}))", 1459 | "format": "table", 1460 | "hide": false, 1461 | "instant": true, 1462 | "interval": "", 1463 | "intervalFactor": 1, 1464 | "legendFormat": "", 1465 | "refId": "B" 1466 | } 1467 | ], 1468 | "title": "【$show_hostname】:Disk Space Used Basic(EXT?/XFS)", 1469 | "transform": "table", 1470 | "type": "table-old" 1471 | }, 1472 | { 1473 | "cacheTimeout": null, 1474 | "datasource": "${DS__VICTORIAMETRICS}", 1475 | "description": "", 1476 | "fieldConfig": { 1477 | "defaults": { 1478 | "custom": {}, 1479 | "decimals": 2, 1480 | "mappings": [ 1481 | { 1482 | "id": 0, 1483 | "op": "=", 1484 | "text": "N/A", 1485 | "type": 1, 1486 | "value": "null" 1487 | } 1488 | ], 1489 | "nullValueMode": "connected", 1490 | "thresholds": { 1491 | "mode": "absolute", 1492 | "steps": [ 1493 | { 1494 | "color": "rgba(50, 172, 45, 0.97)", 1495 | "value": null 1496 | }, 1497 | { 1498 | "color": "rgba(237, 129, 40, 0.89)", 1499 | "value": 20 1500 | }, 1501 | { 1502 | "color": "#d44a3a", 1503 | "value": 50 1504 | } 1505 | ] 1506 | }, 1507 | "unit": "percent" 1508 | }, 1509 | "overrides": [] 1510 | }, 1511 | "gridPos": { 1512 | "h": 2, 1513 | "w": 2, 1514 | "x": 15, 1515 | "y": 16 1516 | }, 1517 | "id": 20, 1518 | "interval": null, 1519 | "links": [], 1520 | "maxDataPoints": 100, 1521 | "options": { 1522 | "colorMode": "value", 1523 | "graphMode": "area", 1524 | "justifyMode": "auto", 1525 | "orientation": "horizontal", 1526 | "reduceOptions": { 1527 | "calcs": [ 1528 | "last" 1529 | ], 1530 | "fields": "", 1531 | "values": false 1532 | }, 1533 | "textMode": "auto" 1534 | }, 1535 | "pluginVersion": "7.2.0", 1536 | "targets": [ 1537 | { 1538 | "expr": "avg(rate(node_cpu_seconds_total{instance=~\"$node\",mode=\"iowait\"}[$interval])) * 100", 1539 | "format": "time_series", 1540 | "hide": false, 1541 | "instant": false, 1542 | "interval": "", 1543 | "intervalFactor": 1, 1544 | "legendFormat": "", 1545 | "refId": "A", 1546 | "step": 20 1547 | } 1548 | ], 1549 | "timeFrom": null, 1550 | "timeShift": null, 1551 | "title": "CPU iowait", 1552 | "type": "stat" 1553 | }, 1554 | { 1555 | "aliasColors": { 1556 | "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_in": "light-red", 1557 | "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_in下载": "green", 1558 | "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_out上传": "yellow", 1559 | "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_in下载": "purple", 1560 | "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_out": "purple", 1561 | "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_out上传": "blue" 1562 | }, 1563 | "bars": true, 1564 | "dashLength": 10, 1565 | "dashes": false, 1566 | "datasource": "${DS__VICTORIAMETRICS}", 1567 | "editable": true, 1568 | "error": false, 1569 | "fieldConfig": { 1570 | "defaults": { 1571 | "custom": {}, 1572 | "links": [] 1573 | }, 1574 | "overrides": [] 1575 | }, 1576 | "fill": 1, 1577 | "fillGradient": 0, 1578 | "grid": {}, 1579 | "gridPos": { 1580 | "h": 6, 1581 | "w": 7, 1582 | "x": 17, 1583 | "y": 16 1584 | }, 1585 | "hiddenSeries": false, 1586 | "id": 183, 1587 | "legend": { 1588 | "alignAsTable": true, 1589 | "avg": true, 1590 | "current": true, 1591 | "hideEmpty": true, 1592 | "hideZero": true, 1593 | "max": true, 1594 | "min": false, 1595 | "show": false, 1596 | "sort": "current", 1597 | "sortDesc": true, 1598 | "total": true, 1599 | "values": true 1600 | }, 1601 | "lines": false, 1602 | "linewidth": 2, 1603 | "links": [], 1604 | "nullPointMode": "null as zero", 1605 | "options": { 1606 | "alertThreshold": true 1607 | }, 1608 | "percentage": false, 1609 | "pluginVersion": "7.2.0", 1610 | "pointradius": 1, 1611 | "points": false, 1612 | "renderer": "flot", 1613 | "repeat": null, 1614 | "seriesOverrides": [ 1615 | { 1616 | "$$hashKey": "object:2970", 1617 | "alias": "/.*_transmit$/", 1618 | "transform": "negative-Y" 1619 | } 1620 | ], 1621 | "spaceLength": 10, 1622 | "stack": false, 1623 | "steppedLine": false, 1624 | "targets": [ 1625 | { 1626 | "expr": "increase(node_network_receive_bytes_total{instance=~\"$node\",device=~\"$device\"}[60m])", 1627 | "interval": "60m", 1628 | "intervalFactor": 1, 1629 | "legendFormat": "{{device}}_receive", 1630 | "metric": "", 1631 | "refId": "A", 1632 | "step": 600, 1633 | "target": "" 1634 | }, 1635 | { 1636 | "expr": "increase(node_network_transmit_bytes_total{instance=~\"$node\",device=~\"$device\"}[60m])", 1637 | "hide": false, 1638 | "interval": "60m", 1639 | "intervalFactor": 1, 1640 | "legendFormat": "{{device}}_transmit", 1641 | "refId": "B", 1642 | "step": 600 1643 | } 1644 | ], 1645 | "thresholds": [], 1646 | "timeFrom": null, 1647 | "timeRegions": [], 1648 | "timeShift": null, 1649 | "title": "Internet traffic per hour $device", 1650 | "tooltip": { 1651 | "msResolution": false, 1652 | "shared": true, 1653 | "sort": 0, 1654 | "value_type": "cumulative" 1655 | }, 1656 | "type": "graph", 1657 | "xaxis": { 1658 | "buckets": null, 1659 | "mode": "time", 1660 | "name": null, 1661 | "show": true, 1662 | "values": [] 1663 | }, 1664 | "yaxes": [ 1665 | { 1666 | "$$hashKey": "object:2977", 1667 | "format": "bytes", 1668 | "label": "transmit(-)/receive(+)", 1669 | "logBase": 1, 1670 | "max": null, 1671 | "min": null, 1672 | "show": true 1673 | }, 1674 | { 1675 | "$$hashKey": "object:2978", 1676 | "format": "short", 1677 | "logBase": 1, 1678 | "max": null, 1679 | "min": null, 1680 | "show": false 1681 | } 1682 | ], 1683 | "yaxis": { 1684 | "align": false, 1685 | "alignLevel": null 1686 | } 1687 | }, 1688 | { 1689 | "cacheTimeout": null, 1690 | "datasource": "${DS__VICTORIAMETRICS}", 1691 | "description": "", 1692 | "fieldConfig": { 1693 | "defaults": { 1694 | "custom": {}, 1695 | "mappings": [ 1696 | { 1697 | "id": 0, 1698 | "op": "=", 1699 | "text": "N/A", 1700 | "type": 1, 1701 | "value": "null" 1702 | } 1703 | ], 1704 | "nullValueMode": "null", 1705 | "thresholds": { 1706 | "mode": "absolute", 1707 | "steps": [ 1708 | { 1709 | "color": "rgba(245, 54, 54, 0.9)", 1710 | "value": null 1711 | }, 1712 | { 1713 | "color": "rgba(237, 129, 40, 0.89)", 1714 | "value": 1 1715 | }, 1716 | { 1717 | "color": "rgba(50, 172, 45, 0.97)", 1718 | "value": 2 1719 | } 1720 | ] 1721 | }, 1722 | "unit": "short" 1723 | }, 1724 | "overrides": [] 1725 | }, 1726 | "gridPos": { 1727 | "h": 2, 1728 | "w": 2, 1729 | "x": 0, 1730 | "y": 18 1731 | }, 1732 | "id": 14, 1733 | "interval": null, 1734 | "links": [], 1735 | "maxDataPoints": 100, 1736 | "options": { 1737 | "colorMode": "value", 1738 | "graphMode": "none", 1739 | "justifyMode": "auto", 1740 | "orientation": "horizontal", 1741 | "reduceOptions": { 1742 | "calcs": [ 1743 | "lastNotNull" 1744 | ], 1745 | "fields": "", 1746 | "values": false 1747 | }, 1748 | "textMode": "value" 1749 | }, 1750 | "pluginVersion": "7.2.0", 1751 | "targets": [ 1752 | { 1753 | "expr": "count(node_cpu_seconds_total{instance=~\"$node\", mode='system'})", 1754 | "format": "time_series", 1755 | "instant": true, 1756 | "interval": "", 1757 | "intervalFactor": 1, 1758 | "legendFormat": "", 1759 | "refId": "A", 1760 | "step": 20 1761 | } 1762 | ], 1763 | "title": "CPU Cores", 1764 | "type": "stat" 1765 | }, 1766 | { 1767 | "cacheTimeout": null, 1768 | "datasource": "${DS__VICTORIAMETRICS}", 1769 | "description": "", 1770 | "fieldConfig": { 1771 | "defaults": { 1772 | "custom": {}, 1773 | "mappings": [ 1774 | { 1775 | "$$hashKey": "object:193", 1776 | "id": 0, 1777 | "op": "=", 1778 | "text": "N/A", 1779 | "type": 1, 1780 | "value": "null" 1781 | } 1782 | ], 1783 | "nullValueMode": "null", 1784 | "thresholds": { 1785 | "mode": "absolute", 1786 | "steps": [ 1787 | { 1788 | "color": "rgba(245, 54, 54, 0.9)", 1789 | "value": null 1790 | }, 1791 | { 1792 | "color": "rgba(237, 129, 40, 0.89)", 1793 | "value": 100000 1794 | }, 1795 | { 1796 | "color": "rgba(50, 172, 45, 0.97)", 1797 | "value": 1000000 1798 | } 1799 | ] 1800 | }, 1801 | "unit": "short" 1802 | }, 1803 | "overrides": [] 1804 | }, 1805 | "gridPos": { 1806 | "h": 2, 1807 | "w": 2, 1808 | "x": 15, 1809 | "y": 18 1810 | }, 1811 | "id": 179, 1812 | "interval": null, 1813 | "links": [], 1814 | "maxDataPoints": 100, 1815 | "options": { 1816 | "colorMode": "value", 1817 | "graphMode": "none", 1818 | "justifyMode": "auto", 1819 | "orientation": "horizontal", 1820 | "reduceOptions": { 1821 | "calcs": [ 1822 | "lastNotNull" 1823 | ], 1824 | "fields": "", 1825 | "values": false 1826 | }, 1827 | "textMode": "auto" 1828 | }, 1829 | "pluginVersion": "7.2.0", 1830 | "targets": [ 1831 | { 1832 | "expr": "avg(node_filesystem_files_free{instance=~\"$node\",mountpoint=\"$maxmount\",fstype=~\"ext.?|xfs\"})", 1833 | "format": "time_series", 1834 | "instant": true, 1835 | "interval": "", 1836 | "intervalFactor": 1, 1837 | "legendFormat": "", 1838 | "refId": "A", 1839 | "step": 20 1840 | } 1841 | ], 1842 | "title": "Free inodes:$maxmount ", 1843 | "type": "stat" 1844 | }, 1845 | { 1846 | "cacheTimeout": null, 1847 | "datasource": "${DS__VICTORIAMETRICS}", 1848 | "description": "", 1849 | "fieldConfig": { 1850 | "defaults": { 1851 | "custom": {}, 1852 | "decimals": 0, 1853 | "mappings": [ 1854 | { 1855 | "id": 0, 1856 | "op": "=", 1857 | "text": "N/A", 1858 | "type": 1, 1859 | "value": "null" 1860 | } 1861 | ], 1862 | "nullValueMode": "null", 1863 | "thresholds": { 1864 | "mode": "absolute", 1865 | "steps": [ 1866 | { 1867 | "color": "rgba(245, 54, 54, 0.9)", 1868 | "value": null 1869 | }, 1870 | { 1871 | "color": "rgba(237, 129, 40, 0.89)", 1872 | "value": 2 1873 | }, 1874 | { 1875 | "color": "rgba(50, 172, 45, 0.97)", 1876 | "value": 3 1877 | } 1878 | ] 1879 | }, 1880 | "unit": "bytes" 1881 | }, 1882 | "overrides": [] 1883 | }, 1884 | "gridPos": { 1885 | "h": 2, 1886 | "w": 2, 1887 | "x": 0, 1888 | "y": 20 1889 | }, 1890 | "id": 75, 1891 | "interval": null, 1892 | "links": [], 1893 | "maxDataPoints": 100, 1894 | "options": { 1895 | "colorMode": "value", 1896 | "graphMode": "none", 1897 | "justifyMode": "auto", 1898 | "orientation": "horizontal", 1899 | "reduceOptions": { 1900 | "calcs": [ 1901 | "lastNotNull" 1902 | ], 1903 | "fields": "", 1904 | "values": false 1905 | }, 1906 | "textMode": "auto" 1907 | }, 1908 | "pluginVersion": "7.2.0", 1909 | "targets": [ 1910 | { 1911 | "expr": "sum(node_memory_MemTotal_bytes{instance=~\"$node\"})", 1912 | "format": "time_series", 1913 | "instant": true, 1914 | "interval": "", 1915 | "intervalFactor": 1, 1916 | "legendFormat": "{{instance}}", 1917 | "refId": "A", 1918 | "step": 20 1919 | } 1920 | ], 1921 | "title": "Total RAM", 1922 | "type": "stat" 1923 | }, 1924 | { 1925 | "cacheTimeout": null, 1926 | "datasource": "${DS__VICTORIAMETRICS}", 1927 | "description": "", 1928 | "fieldConfig": { 1929 | "defaults": { 1930 | "custom": {}, 1931 | "mappings": [ 1932 | { 1933 | "$$hashKey": "object:271", 1934 | "id": 0, 1935 | "op": "=", 1936 | "text": "N/A", 1937 | "type": 1, 1938 | "value": "null" 1939 | } 1940 | ], 1941 | "nullValueMode": "null", 1942 | "thresholds": { 1943 | "mode": "absolute", 1944 | "steps": [ 1945 | { 1946 | "color": "rgba(245, 54, 54, 0.9)", 1947 | "value": null 1948 | }, 1949 | { 1950 | "color": "rgba(237, 129, 40, 0.89)", 1951 | "value": 1024 1952 | }, 1953 | { 1954 | "color": "rgba(50, 172, 45, 0.97)", 1955 | "value": 10000 1956 | } 1957 | ] 1958 | }, 1959 | "unit": "locale" 1960 | }, 1961 | "overrides": [] 1962 | }, 1963 | "gridPos": { 1964 | "h": 2, 1965 | "w": 2, 1966 | "x": 15, 1967 | "y": 20 1968 | }, 1969 | "id": 178, 1970 | "interval": null, 1971 | "links": [], 1972 | "maxDataPoints": 100, 1973 | "options": { 1974 | "colorMode": "value", 1975 | "graphMode": "none", 1976 | "justifyMode": "auto", 1977 | "orientation": "horizontal", 1978 | "reduceOptions": { 1979 | "calcs": [ 1980 | "lastNotNull" 1981 | ], 1982 | "fields": "", 1983 | "values": false 1984 | }, 1985 | "textMode": "auto" 1986 | }, 1987 | "pluginVersion": "7.2.0", 1988 | "targets": [ 1989 | { 1990 | "expr": "avg(node_filefd_maximum{instance=~\"$node\"})", 1991 | "format": "time_series", 1992 | "instant": true, 1993 | "intervalFactor": 1, 1994 | "legendFormat": "", 1995 | "refId": "A", 1996 | "step": 20 1997 | } 1998 | ], 1999 | "title": "Total filefd", 2000 | "type": "stat" 2001 | }, 2002 | { 2003 | "aliasColors": { 2004 | "192.168.200.241:9100_Total": "dark-red", 2005 | "Idle - Waiting for something to happen": "#052B51", 2006 | "guest": "#9AC48A", 2007 | "idle": "#052B51", 2008 | "iowait": "#EAB839", 2009 | "irq": "#BF1B00", 2010 | "nice": "#C15C17", 2011 | "sdb_每秒I/O操作%": "#d683ce", 2012 | "softirq": "#E24D42", 2013 | "steal": "#FCE2DE", 2014 | "system": "#508642", 2015 | "user": "#5195CE", 2016 | "磁盘花费在I/O操作占比": "#ba43a9" 2017 | }, 2018 | "bars": false, 2019 | "dashLength": 10, 2020 | "dashes": false, 2021 | "datasource": "${DS__VICTORIAMETRICS}", 2022 | "decimals": 2, 2023 | "description": "", 2024 | "fieldConfig": { 2025 | "defaults": { 2026 | "custom": {}, 2027 | "links": [] 2028 | }, 2029 | "overrides": [] 2030 | }, 2031 | "fill": 1, 2032 | "fillGradient": 0, 2033 | "gridPos": { 2034 | "h": 8, 2035 | "w": 8, 2036 | "x": 0, 2037 | "y": 22 2038 | }, 2039 | "hiddenSeries": false, 2040 | "id": 7, 2041 | "legend": { 2042 | "alignAsTable": true, 2043 | "avg": true, 2044 | "current": true, 2045 | "hideEmpty": true, 2046 | "hideZero": true, 2047 | "max": true, 2048 | "min": true, 2049 | "rightSide": false, 2050 | "show": true, 2051 | "sideWidth": null, 2052 | "sort": "current", 2053 | "sortDesc": true, 2054 | "total": false, 2055 | "values": true 2056 | }, 2057 | "lines": true, 2058 | "linewidth": 2, 2059 | "links": [], 2060 | "maxPerRow": 6, 2061 | "nullPointMode": "null", 2062 | "options": { 2063 | "alertThreshold": true 2064 | }, 2065 | "percentage": false, 2066 | "pluginVersion": "7.2.0", 2067 | "pointradius": 5, 2068 | "points": false, 2069 | "renderer": "flot", 2070 | "repeat": null, 2071 | "seriesOverrides": [ 2072 | { 2073 | "$$hashKey": "object:3051", 2074 | "alias": "/.*Total/", 2075 | "color": "#C4162A", 2076 | "fill": 0 2077 | } 2078 | ], 2079 | "spaceLength": 10, 2080 | "stack": false, 2081 | "steppedLine": false, 2082 | "targets": [ 2083 | { 2084 | "expr": "avg(rate(node_cpu_seconds_total{instance=~\"$node\",mode=\"system\"}[$interval])) by (instance) *100", 2085 | "format": "time_series", 2086 | "hide": false, 2087 | "instant": false, 2088 | "interval": "", 2089 | "intervalFactor": 1, 2090 | "legendFormat": "System", 2091 | "refId": "A", 2092 | "step": 20 2093 | }, 2094 | { 2095 | "expr": "avg(rate(node_cpu_seconds_total{instance=~\"$node\",mode=\"user\"}[$interval])) by (instance) *100", 2096 | "format": "time_series", 2097 | "hide": false, 2098 | "interval": "", 2099 | "intervalFactor": 1, 2100 | "legendFormat": "User", 2101 | "refId": "B", 2102 | "step": 240 2103 | }, 2104 | { 2105 | "expr": "avg(rate(node_cpu_seconds_total{instance=~\"$node\",mode=\"iowait\"}[$interval])) by (instance) *100", 2106 | "format": "time_series", 2107 | "hide": false, 2108 | "instant": false, 2109 | "interval": "", 2110 | "intervalFactor": 1, 2111 | "legendFormat": "Iowait", 2112 | "refId": "D", 2113 | "step": 240 2114 | }, 2115 | { 2116 | "expr": "(1 - avg(rate(node_cpu_seconds_total{instance=~\"$node\",mode=\"idle\"}[$interval])) by (instance))*100", 2117 | "format": "time_series", 2118 | "hide": false, 2119 | "interval": "", 2120 | "intervalFactor": 1, 2121 | "legendFormat": "Total", 2122 | "refId": "F", 2123 | "step": 240 2124 | } 2125 | ], 2126 | "thresholds": [], 2127 | "timeFrom": null, 2128 | "timeRegions": [], 2129 | "timeShift": null, 2130 | "title": "CPU% Basic", 2131 | "tooltip": { 2132 | "shared": true, 2133 | "sort": 2, 2134 | "value_type": "individual" 2135 | }, 2136 | "type": "graph", 2137 | "xaxis": { 2138 | "buckets": null, 2139 | "mode": "time", 2140 | "name": null, 2141 | "show": true, 2142 | "values": [] 2143 | }, 2144 | "yaxes": [ 2145 | { 2146 | "$$hashKey": "object:11294", 2147 | "decimals": 0, 2148 | "format": "percent", 2149 | "label": "", 2150 | "logBase": 1, 2151 | "max": null, 2152 | "min": null, 2153 | "show": true 2154 | }, 2155 | { 2156 | "$$hashKey": "object:11295", 2157 | "format": "short", 2158 | "label": null, 2159 | "logBase": 1, 2160 | "max": null, 2161 | "min": null, 2162 | "show": false 2163 | } 2164 | ], 2165 | "yaxis": { 2166 | "align": false, 2167 | "alignLevel": null 2168 | } 2169 | }, 2170 | { 2171 | "aliasColors": { 2172 | "192.168.200.241:9100_总内存": "dark-red", 2173 | "使用率": "yellow", 2174 | "内存_Avaliable": "#6ED0E0", 2175 | "内存_Cached": "#EF843C", 2176 | "内存_Free": "#629E51", 2177 | "内存_Total": "#6d1f62", 2178 | "内存_Used": "#eab839", 2179 | "可用": "#9ac48a", 2180 | "总内存": "#bf1b00" 2181 | }, 2182 | "bars": false, 2183 | "dashLength": 10, 2184 | "dashes": false, 2185 | "datasource": "${DS__VICTORIAMETRICS}", 2186 | "decimals": 2, 2187 | "fieldConfig": { 2188 | "defaults": { 2189 | "custom": {}, 2190 | "links": [] 2191 | }, 2192 | "overrides": [] 2193 | }, 2194 | "fill": 1, 2195 | "fillGradient": 0, 2196 | "gridPos": { 2197 | "h": 8, 2198 | "w": 8, 2199 | "x": 8, 2200 | "y": 22 2201 | }, 2202 | "height": "300", 2203 | "hiddenSeries": false, 2204 | "id": 156, 2205 | "legend": { 2206 | "alignAsTable": true, 2207 | "avg": true, 2208 | "current": true, 2209 | "hideEmpty": true, 2210 | "hideZero": true, 2211 | "max": true, 2212 | "min": true, 2213 | "rightSide": false, 2214 | "show": true, 2215 | "sort": "current", 2216 | "sortDesc": true, 2217 | "total": false, 2218 | "values": true 2219 | }, 2220 | "lines": true, 2221 | "linewidth": 2, 2222 | "links": [], 2223 | "nullPointMode": "null", 2224 | "options": { 2225 | "alertThreshold": true 2226 | }, 2227 | "percentage": false, 2228 | "pluginVersion": "7.2.0", 2229 | "pointradius": 5, 2230 | "points": false, 2231 | "renderer": "flot", 2232 | "seriesOverrides": [ 2233 | { 2234 | "$$hashKey": "object:3234", 2235 | "alias": "Total", 2236 | "color": "#C4162A", 2237 | "fill": 0 2238 | }, 2239 | { 2240 | "$$hashKey": "object:3235", 2241 | "alias": "Used%", 2242 | "color": "rgb(0, 209, 255)", 2243 | "lines": false, 2244 | "pointradius": 1, 2245 | "points": true, 2246 | "yaxis": 2 2247 | } 2248 | ], 2249 | "spaceLength": 10, 2250 | "stack": false, 2251 | "steppedLine": false, 2252 | "targets": [ 2253 | { 2254 | "expr": "node_memory_MemTotal_bytes{instance=~\"$node\"}", 2255 | "format": "time_series", 2256 | "hide": false, 2257 | "instant": false, 2258 | "interval": "", 2259 | "intervalFactor": 1, 2260 | "legendFormat": "Total", 2261 | "refId": "A", 2262 | "step": 4 2263 | }, 2264 | { 2265 | "expr": "node_memory_MemTotal_bytes{instance=~\"$node\"} - node_memory_MemAvailable_bytes{instance=~\"$node\"}", 2266 | "format": "time_series", 2267 | "hide": false, 2268 | "interval": "", 2269 | "intervalFactor": 1, 2270 | "legendFormat": "Used", 2271 | "refId": "B", 2272 | "step": 4 2273 | }, 2274 | { 2275 | "expr": "node_memory_MemAvailable_bytes{instance=~\"$node\"}", 2276 | "format": "time_series", 2277 | "hide": false, 2278 | "interval": "", 2279 | "intervalFactor": 1, 2280 | "legendFormat": "Avaliable", 2281 | "refId": "F", 2282 | "step": 4 2283 | }, 2284 | { 2285 | "expr": "node_memory_Buffers_bytes{instance=~\"$node\"}", 2286 | "format": "time_series", 2287 | "hide": true, 2288 | "interval": "", 2289 | "intervalFactor": 1, 2290 | "legendFormat": "内存_Buffers", 2291 | "refId": "D", 2292 | "step": 4 2293 | }, 2294 | { 2295 | "expr": "node_memory_MemFree_bytes{instance=~\"$node\"}", 2296 | "format": "time_series", 2297 | "hide": true, 2298 | "intervalFactor": 1, 2299 | "legendFormat": "内存_Free", 2300 | "refId": "C", 2301 | "step": 4 2302 | }, 2303 | { 2304 | "expr": "node_memory_Cached_bytes{instance=~\"$node\"}", 2305 | "format": "time_series", 2306 | "hide": true, 2307 | "intervalFactor": 1, 2308 | "legendFormat": "内存_Cached", 2309 | "refId": "E", 2310 | "step": 4 2311 | }, 2312 | { 2313 | "expr": "node_memory_MemTotal_bytes{instance=~\"$node\"} - (node_memory_Cached_bytes{instance=~\"$node\"} + node_memory_Buffers_bytes{instance=~\"$node\"} + node_memory_MemFree_bytes{instance=~\"$node\"})", 2314 | "format": "time_series", 2315 | "hide": true, 2316 | "intervalFactor": 1, 2317 | "refId": "G" 2318 | }, 2319 | { 2320 | "expr": "(1 - (node_memory_MemAvailable_bytes{instance=~\"$node\"} / (node_memory_MemTotal_bytes{instance=~\"$node\"})))* 100", 2321 | "format": "time_series", 2322 | "hide": false, 2323 | "interval": "30m", 2324 | "intervalFactor": 10, 2325 | "legendFormat": "Used%", 2326 | "refId": "H" 2327 | } 2328 | ], 2329 | "thresholds": [], 2330 | "timeFrom": null, 2331 | "timeRegions": [], 2332 | "timeShift": null, 2333 | "title": "Memory Basic", 2334 | "tooltip": { 2335 | "shared": true, 2336 | "sort": 2, 2337 | "value_type": "individual" 2338 | }, 2339 | "type": "graph", 2340 | "xaxis": { 2341 | "buckets": null, 2342 | "mode": "time", 2343 | "name": null, 2344 | "show": true, 2345 | "values": [] 2346 | }, 2347 | "yaxes": [ 2348 | { 2349 | "$$hashKey": "object:3130", 2350 | "format": "bytes", 2351 | "label": null, 2352 | "logBase": 1, 2353 | "max": null, 2354 | "min": "0", 2355 | "show": true 2356 | }, 2357 | { 2358 | "$$hashKey": "object:3131", 2359 | "format": "percent", 2360 | "label": "Utilization%", 2361 | "logBase": 1, 2362 | "max": "100", 2363 | "min": "0", 2364 | "show": true 2365 | } 2366 | ], 2367 | "yaxis": { 2368 | "align": false, 2369 | "alignLevel": null 2370 | } 2371 | }, 2372 | { 2373 | "aliasColors": { 2374 | "192.168.10.227:9100_em1_in下载": "super-light-green", 2375 | "192.168.10.227:9100_em1_out上传": "dark-blue" 2376 | }, 2377 | "bars": false, 2378 | "dashLength": 10, 2379 | "dashes": false, 2380 | "datasource": "${DS__VICTORIAMETRICS}", 2381 | "decimals": 2, 2382 | "fieldConfig": { 2383 | "defaults": { 2384 | "custom": {}, 2385 | "links": [] 2386 | }, 2387 | "overrides": [] 2388 | }, 2389 | "fill": 1, 2390 | "fillGradient": 0, 2391 | "gridPos": { 2392 | "h": 8, 2393 | "w": 8, 2394 | "x": 16, 2395 | "y": 22 2396 | }, 2397 | "height": "300", 2398 | "hiddenSeries": false, 2399 | "id": 157, 2400 | "legend": { 2401 | "alignAsTable": true, 2402 | "avg": true, 2403 | "current": true, 2404 | "hideEmpty": true, 2405 | "hideZero": true, 2406 | "max": true, 2407 | "min": true, 2408 | "rightSide": false, 2409 | "show": true, 2410 | "sort": "current", 2411 | "sortDesc": true, 2412 | "total": false, 2413 | "values": true 2414 | }, 2415 | "lines": true, 2416 | "linewidth": 1, 2417 | "links": [], 2418 | "nullPointMode": "null", 2419 | "options": { 2420 | "alertThreshold": true 2421 | }, 2422 | "percentage": false, 2423 | "pluginVersion": "7.2.0", 2424 | "pointradius": 2, 2425 | "points": false, 2426 | "renderer": "flot", 2427 | "seriesOverrides": [ 2428 | { 2429 | "$$hashKey": "object:3308", 2430 | "alias": "/.*_transmit$/", 2431 | "transform": "negative-Y" 2432 | } 2433 | ], 2434 | "spaceLength": 10, 2435 | "stack": false, 2436 | "steppedLine": false, 2437 | "targets": [ 2438 | { 2439 | "expr": "rate(node_network_receive_bytes_total{instance=~'$node',device=~\"$device\"}[$interval])*8", 2440 | "format": "time_series", 2441 | "interval": "", 2442 | "intervalFactor": 1, 2443 | "legendFormat": "{{device}}_receive", 2444 | "refId": "A", 2445 | "step": 4 2446 | }, 2447 | { 2448 | "expr": "rate(node_network_transmit_bytes_total{instance=~'$node',device=~\"$device\"}[$interval])*8", 2449 | "format": "time_series", 2450 | "interval": "", 2451 | "intervalFactor": 1, 2452 | "legendFormat": "{{device}}_transmit", 2453 | "refId": "B", 2454 | "step": 4 2455 | } 2456 | ], 2457 | "thresholds": [], 2458 | "timeFrom": null, 2459 | "timeRegions": [], 2460 | "timeShift": null, 2461 | "title": "Network bandwidth usage per second $device", 2462 | "tooltip": { 2463 | "shared": true, 2464 | "sort": 2, 2465 | "value_type": "individual" 2466 | }, 2467 | "type": "graph", 2468 | "xaxis": { 2469 | "buckets": null, 2470 | "mode": "time", 2471 | "name": null, 2472 | "show": true, 2473 | "values": [] 2474 | }, 2475 | "yaxes": [ 2476 | { 2477 | "$$hashKey": "object:3315", 2478 | "format": "bps", 2479 | "label": "transmit(-)/receive(+)", 2480 | "logBase": 1, 2481 | "max": null, 2482 | "min": null, 2483 | "show": true 2484 | }, 2485 | { 2486 | "$$hashKey": "object:3316", 2487 | "format": "short", 2488 | "label": null, 2489 | "logBase": 1, 2490 | "max": null, 2491 | "min": null, 2492 | "show": false 2493 | } 2494 | ], 2495 | "yaxis": { 2496 | "align": false, 2497 | "alignLevel": null 2498 | } 2499 | }, 2500 | { 2501 | "aliasColors": { 2502 | "15分钟": "#6ED0E0", 2503 | "1分钟": "#BF1B00", 2504 | "5分钟": "#CCA300" 2505 | }, 2506 | "bars": false, 2507 | "dashLength": 10, 2508 | "dashes": false, 2509 | "datasource": "${DS__VICTORIAMETRICS}", 2510 | "decimals": 2, 2511 | "editable": true, 2512 | "error": false, 2513 | "fieldConfig": { 2514 | "defaults": { 2515 | "custom": {}, 2516 | "links": [] 2517 | }, 2518 | "overrides": [] 2519 | }, 2520 | "fill": 1, 2521 | "fillGradient": 1, 2522 | "grid": {}, 2523 | "gridPos": { 2524 | "h": 8, 2525 | "w": 8, 2526 | "x": 0, 2527 | "y": 30 2528 | }, 2529 | "height": "300", 2530 | "hiddenSeries": false, 2531 | "id": 13, 2532 | "legend": { 2533 | "alignAsTable": true, 2534 | "avg": true, 2535 | "current": true, 2536 | "hideEmpty": true, 2537 | "hideZero": true, 2538 | "max": true, 2539 | "min": true, 2540 | "rightSide": false, 2541 | "show": true, 2542 | "sort": "current", 2543 | "sortDesc": true, 2544 | "total": false, 2545 | "values": true 2546 | }, 2547 | "lines": true, 2548 | "linewidth": 2, 2549 | "links": [], 2550 | "maxPerRow": 6, 2551 | "nullPointMode": "null", 2552 | "options": { 2553 | "alertThreshold": true 2554 | }, 2555 | "percentage": false, 2556 | "pluginVersion": "7.2.0", 2557 | "pointradius": 5, 2558 | "points": false, 2559 | "renderer": "flot", 2560 | "repeat": null, 2561 | "seriesOverrides": [ 2562 | { 2563 | "$$hashKey": "object:3389", 2564 | "alias": "/.*CPU cores/", 2565 | "color": "#C4162A" 2566 | } 2567 | ], 2568 | "spaceLength": 10, 2569 | "stack": false, 2570 | "steppedLine": false, 2571 | "targets": [ 2572 | { 2573 | "expr": "node_load1{instance=~\"$node\"}", 2574 | "format": "time_series", 2575 | "instant": false, 2576 | "interval": "", 2577 | "intervalFactor": 1, 2578 | "legendFormat": "1m", 2579 | "metric": "", 2580 | "refId": "A", 2581 | "step": 20, 2582 | "target": "" 2583 | }, 2584 | { 2585 | "expr": "node_load5{instance=~\"$node\"}", 2586 | "format": "time_series", 2587 | "instant": false, 2588 | "interval": "", 2589 | "intervalFactor": 1, 2590 | "legendFormat": "5m", 2591 | "refId": "B", 2592 | "step": 20 2593 | }, 2594 | { 2595 | "expr": "node_load15{instance=~\"$node\"}", 2596 | "format": "time_series", 2597 | "instant": false, 2598 | "interval": "", 2599 | "intervalFactor": 1, 2600 | "legendFormat": "15m", 2601 | "refId": "C", 2602 | "step": 20 2603 | }, 2604 | { 2605 | "expr": " sum(count(node_cpu_seconds_total{instance=~\"$node\", mode='system'}) by (cpu,instance)) by(instance)", 2606 | "format": "time_series", 2607 | "instant": false, 2608 | "interval": "", 2609 | "intervalFactor": 1, 2610 | "legendFormat": "CPU cores", 2611 | "refId": "D", 2612 | "step": 20 2613 | } 2614 | ], 2615 | "thresholds": [], 2616 | "timeFrom": null, 2617 | "timeRegions": [], 2618 | "timeShift": null, 2619 | "title": "System Load", 2620 | "tooltip": { 2621 | "msResolution": false, 2622 | "shared": true, 2623 | "sort": 2, 2624 | "value_type": "cumulative" 2625 | }, 2626 | "type": "graph", 2627 | "xaxis": { 2628 | "buckets": null, 2629 | "mode": "time", 2630 | "name": null, 2631 | "show": true, 2632 | "values": [] 2633 | }, 2634 | "yaxes": [ 2635 | { 2636 | "$$hashKey": "object:3396", 2637 | "format": "short", 2638 | "logBase": 1, 2639 | "max": null, 2640 | "min": null, 2641 | "show": true 2642 | }, 2643 | { 2644 | "$$hashKey": "object:3397", 2645 | "format": "short", 2646 | "logBase": 1, 2647 | "max": null, 2648 | "min": null, 2649 | "show": true 2650 | } 2651 | ], 2652 | "yaxis": { 2653 | "align": false, 2654 | "alignLevel": null 2655 | } 2656 | }, 2657 | { 2658 | "aliasColors": { 2659 | "vda_write": "#6ED0E0" 2660 | }, 2661 | "bars": false, 2662 | "dashLength": 10, 2663 | "dashes": false, 2664 | "datasource": "${DS__VICTORIAMETRICS}", 2665 | "decimals": 2, 2666 | "description": "Per second read / write bytes ", 2667 | "fieldConfig": { 2668 | "defaults": { 2669 | "custom": {}, 2670 | "links": [] 2671 | }, 2672 | "overrides": [] 2673 | }, 2674 | "fill": 1, 2675 | "fillGradient": 1, 2676 | "gridPos": { 2677 | "h": 8, 2678 | "w": 8, 2679 | "x": 8, 2680 | "y": 30 2681 | }, 2682 | "height": "300", 2683 | "hiddenSeries": false, 2684 | "id": 168, 2685 | "legend": { 2686 | "alignAsTable": true, 2687 | "avg": true, 2688 | "current": true, 2689 | "hideEmpty": true, 2690 | "hideZero": true, 2691 | "max": true, 2692 | "min": true, 2693 | "show": true, 2694 | "sort": "current", 2695 | "sortDesc": true, 2696 | "total": false, 2697 | "values": true 2698 | }, 2699 | "lines": true, 2700 | "linewidth": 2, 2701 | "links": [], 2702 | "nullPointMode": "null", 2703 | "options": { 2704 | "alertThreshold": true 2705 | }, 2706 | "percentage": false, 2707 | "pluginVersion": "7.2.0", 2708 | "pointradius": 5, 2709 | "points": false, 2710 | "renderer": "flot", 2711 | "seriesOverrides": [ 2712 | { 2713 | "$$hashKey": "object:3474", 2714 | "alias": "/.*_Read bytes$/", 2715 | "transform": "negative-Y" 2716 | } 2717 | ], 2718 | "spaceLength": 10, 2719 | "stack": false, 2720 | "steppedLine": false, 2721 | "targets": [ 2722 | { 2723 | "expr": "rate(node_disk_read_bytes_total{instance=~\"$node\"}[$interval])", 2724 | "format": "time_series", 2725 | "interval": "", 2726 | "intervalFactor": 1, 2727 | "legendFormat": "{{device}}_Read bytes", 2728 | "refId": "A", 2729 | "step": 10 2730 | }, 2731 | { 2732 | "expr": "rate(node_disk_written_bytes_total{instance=~\"$node\"}[$interval])", 2733 | "format": "time_series", 2734 | "hide": false, 2735 | "interval": "", 2736 | "intervalFactor": 1, 2737 | "legendFormat": "{{device}}_Written bytes", 2738 | "refId": "B", 2739 | "step": 10 2740 | } 2741 | ], 2742 | "thresholds": [], 2743 | "timeFrom": null, 2744 | "timeRegions": [], 2745 | "timeShift": null, 2746 | "title": "Disk R/W Data", 2747 | "tooltip": { 2748 | "shared": true, 2749 | "sort": 2, 2750 | "value_type": "individual" 2751 | }, 2752 | "type": "graph", 2753 | "xaxis": { 2754 | "buckets": null, 2755 | "mode": "time", 2756 | "name": null, 2757 | "show": true, 2758 | "values": [] 2759 | }, 2760 | "yaxes": [ 2761 | { 2762 | "$$hashKey": "object:3481", 2763 | "decimals": null, 2764 | "format": "Bps", 2765 | "label": "Bytes read (-) / write (+)", 2766 | "logBase": 1, 2767 | "max": null, 2768 | "min": null, 2769 | "show": true 2770 | }, 2771 | { 2772 | "$$hashKey": "object:3482", 2773 | "format": "short", 2774 | "label": null, 2775 | "logBase": 1, 2776 | "max": null, 2777 | "min": null, 2778 | "show": false 2779 | } 2780 | ], 2781 | "yaxis": { 2782 | "align": false, 2783 | "alignLevel": null 2784 | } 2785 | }, 2786 | { 2787 | "aliasColors": {}, 2788 | "bars": false, 2789 | "dashLength": 10, 2790 | "dashes": false, 2791 | "datasource": "${DS__VICTORIAMETRICS}", 2792 | "decimals": 1, 2793 | "description": "", 2794 | "fieldConfig": { 2795 | "defaults": { 2796 | "custom": {}, 2797 | "links": [] 2798 | }, 2799 | "overrides": [] 2800 | }, 2801 | "fill": 0, 2802 | "fillGradient": 0, 2803 | "gridPos": { 2804 | "h": 8, 2805 | "w": 8, 2806 | "x": 16, 2807 | "y": 30 2808 | }, 2809 | "hiddenSeries": false, 2810 | "id": 174, 2811 | "legend": { 2812 | "alignAsTable": true, 2813 | "avg": true, 2814 | "current": true, 2815 | "hideEmpty": true, 2816 | "hideZero": true, 2817 | "max": true, 2818 | "min": true, 2819 | "rightSide": false, 2820 | "show": true, 2821 | "sideWidth": null, 2822 | "sort": "current", 2823 | "sortDesc": true, 2824 | "total": false, 2825 | "values": true 2826 | }, 2827 | "lines": true, 2828 | "linewidth": 2, 2829 | "links": [], 2830 | "nullPointMode": "null", 2831 | "options": { 2832 | "alertThreshold": true 2833 | }, 2834 | "percentage": false, 2835 | "pluginVersion": "7.2.0", 2836 | "pointradius": 5, 2837 | "points": false, 2838 | "renderer": "flot", 2839 | "seriesOverrides": [ 2840 | { 2841 | "$$hashKey": "object:3554", 2842 | "alias": "/Inodes.*/", 2843 | "yaxis": 2 2844 | } 2845 | ], 2846 | "spaceLength": 10, 2847 | "stack": false, 2848 | "steppedLine": false, 2849 | "targets": [ 2850 | { 2851 | "expr": "(node_filesystem_size_bytes{instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint !~\".*pod.*\"}-node_filesystem_free_bytes{instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint !~\".*pod.*\"}) *100/(node_filesystem_avail_bytes {instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint !~\".*pod.*\"}+(node_filesystem_size_bytes{instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint !~\".*pod.*\"}-node_filesystem_free_bytes{instance=~'$node',fstype=~\"ext.*|xfs\",mountpoint !~\".*pod.*\"}))", 2852 | "format": "time_series", 2853 | "instant": false, 2854 | "interval": "", 2855 | "intervalFactor": 1, 2856 | "legendFormat": "{{mountpoint}}", 2857 | "refId": "A" 2858 | }, 2859 | { 2860 | "expr": "node_filesystem_files_free{instance=~'$node',fstype=~\"ext.?|xfs\"} / node_filesystem_files{instance=~'$node',fstype=~\"ext.?|xfs\"}", 2861 | "hide": true, 2862 | "interval": "", 2863 | "legendFormat": "Inodes:{{instance}}:{{mountpoint}}", 2864 | "refId": "B" 2865 | } 2866 | ], 2867 | "thresholds": [], 2868 | "timeFrom": null, 2869 | "timeRegions": [], 2870 | "timeShift": null, 2871 | "title": "Disk Space Used% Basic", 2872 | "tooltip": { 2873 | "shared": true, 2874 | "sort": 2, 2875 | "value_type": "individual" 2876 | }, 2877 | "type": "graph", 2878 | "xaxis": { 2879 | "buckets": null, 2880 | "mode": "time", 2881 | "name": null, 2882 | "show": true, 2883 | "values": [] 2884 | }, 2885 | "yaxes": [ 2886 | { 2887 | "$$hashKey": "object:3561", 2888 | "decimals": null, 2889 | "format": "percent", 2890 | "label": "", 2891 | "logBase": 1, 2892 | "max": "100", 2893 | "min": "0", 2894 | "show": true 2895 | }, 2896 | { 2897 | "$$hashKey": "object:3562", 2898 | "decimals": 2, 2899 | "format": "percentunit", 2900 | "label": null, 2901 | "logBase": 1, 2902 | "max": "1", 2903 | "min": null, 2904 | "show": false 2905 | } 2906 | ], 2907 | "yaxis": { 2908 | "align": false, 2909 | "alignLevel": null 2910 | } 2911 | }, 2912 | { 2913 | "aliasColors": { 2914 | "vda_write": "#6ED0E0" 2915 | }, 2916 | "bars": false, 2917 | "dashLength": 10, 2918 | "dashes": false, 2919 | "datasource": "${DS__VICTORIAMETRICS}", 2920 | "decimals": 2, 2921 | "description": "Read/write completions per second\n\nWrites completed: 每个磁盘分区每秒写完成次数\n\nIO now 每个磁盘分区每秒正在处理的输入/输出请求数", 2922 | "fieldConfig": { 2923 | "defaults": { 2924 | "custom": {}, 2925 | "links": [] 2926 | }, 2927 | "overrides": [] 2928 | }, 2929 | "fill": 0, 2930 | "fillGradient": 0, 2931 | "gridPos": { 2932 | "h": 9, 2933 | "w": 8, 2934 | "x": 0, 2935 | "y": 38 2936 | }, 2937 | "height": "300", 2938 | "hiddenSeries": false, 2939 | "id": 161, 2940 | "legend": { 2941 | "alignAsTable": true, 2942 | "avg": true, 2943 | "current": true, 2944 | "hideEmpty": true, 2945 | "hideZero": true, 2946 | "max": true, 2947 | "min": true, 2948 | "show": true, 2949 | "sort": "current", 2950 | "sortDesc": true, 2951 | "total": false, 2952 | "values": true 2953 | }, 2954 | "lines": true, 2955 | "linewidth": 1, 2956 | "links": [], 2957 | "nullPointMode": "null", 2958 | "options": { 2959 | "alertThreshold": true 2960 | }, 2961 | "percentage": false, 2962 | "pluginVersion": "7.2.0", 2963 | "pointradius": 5, 2964 | "points": false, 2965 | "renderer": "flot", 2966 | "seriesOverrides": [ 2967 | { 2968 | "$$hashKey": "object:3711", 2969 | "alias": "/.*_Reads completed$/", 2970 | "transform": "negative-Y" 2971 | } 2972 | ], 2973 | "spaceLength": 10, 2974 | "stack": false, 2975 | "steppedLine": false, 2976 | "targets": [ 2977 | { 2978 | "expr": "rate(node_disk_reads_completed_total{instance=~\"$node\"}[$interval])", 2979 | "format": "time_series", 2980 | "hide": false, 2981 | "interval": "", 2982 | "intervalFactor": 1, 2983 | "legendFormat": "{{device}}_Reads completed", 2984 | "refId": "A", 2985 | "step": 10 2986 | }, 2987 | { 2988 | "expr": "rate(node_disk_writes_completed_total{instance=~\"$node\"}[$interval])", 2989 | "format": "time_series", 2990 | "hide": false, 2991 | "interval": "", 2992 | "intervalFactor": 1, 2993 | "legendFormat": "{{device}}_Writes completed", 2994 | "refId": "B", 2995 | "step": 10 2996 | }, 2997 | { 2998 | "expr": "node_disk_io_now{instance=~\"$node\"}", 2999 | "format": "time_series", 3000 | "hide": true, 3001 | "interval": "", 3002 | "intervalFactor": 1, 3003 | "legendFormat": "{{device}}", 3004 | "refId": "C" 3005 | } 3006 | ], 3007 | "thresholds": [], 3008 | "timeFrom": null, 3009 | "timeRegions": [], 3010 | "timeShift": null, 3011 | "title": "Disk IOps Completed(IOPS)", 3012 | "tooltip": { 3013 | "shared": true, 3014 | "sort": 2, 3015 | "value_type": "individual" 3016 | }, 3017 | "type": "graph", 3018 | "xaxis": { 3019 | "buckets": null, 3020 | "mode": "time", 3021 | "name": null, 3022 | "show": true, 3023 | "values": [] 3024 | }, 3025 | "yaxes": [ 3026 | { 3027 | "$$hashKey": "object:3718", 3028 | "decimals": null, 3029 | "format": "iops", 3030 | "label": "IO read (-) / write (+)", 3031 | "logBase": 1, 3032 | "max": null, 3033 | "min": null, 3034 | "show": true 3035 | }, 3036 | { 3037 | "$$hashKey": "object:3719", 3038 | "format": "short", 3039 | "label": null, 3040 | "logBase": 1, 3041 | "max": null, 3042 | "min": null, 3043 | "show": true 3044 | } 3045 | ], 3046 | "yaxis": { 3047 | "align": false, 3048 | "alignLevel": null 3049 | } 3050 | }, 3051 | { 3052 | "aliasColors": { 3053 | "Idle - Waiting for something to happen": "#052B51", 3054 | "guest": "#9AC48A", 3055 | "idle": "#052B51", 3056 | "iowait": "#EAB839", 3057 | "irq": "#BF1B00", 3058 | "nice": "#C15C17", 3059 | "sdb_每秒I/O操作%": "#d683ce", 3060 | "softirq": "#E24D42", 3061 | "steal": "#FCE2DE", 3062 | "system": "#508642", 3063 | "user": "#5195CE", 3064 | "磁盘花费在I/O操作占比": "#ba43a9" 3065 | }, 3066 | "bars": false, 3067 | "dashLength": 10, 3068 | "dashes": false, 3069 | "datasource": "${DS__VICTORIAMETRICS}", 3070 | "decimals": null, 3071 | "description": "The time spent on I/O in the natural time of each second.(wall-clock time)", 3072 | "fieldConfig": { 3073 | "defaults": { 3074 | "custom": {}, 3075 | "links": [] 3076 | }, 3077 | "overrides": [] 3078 | }, 3079 | "fill": 1, 3080 | "fillGradient": 0, 3081 | "gridPos": { 3082 | "h": 9, 3083 | "w": 8, 3084 | "x": 8, 3085 | "y": 38 3086 | }, 3087 | "hiddenSeries": false, 3088 | "id": 175, 3089 | "legend": { 3090 | "alignAsTable": true, 3091 | "avg": true, 3092 | "current": true, 3093 | "hideEmpty": true, 3094 | "hideZero": true, 3095 | "max": true, 3096 | "min": false, 3097 | "rightSide": false, 3098 | "show": true, 3099 | "sideWidth": null, 3100 | "sort": null, 3101 | "sortDesc": null, 3102 | "total": false, 3103 | "values": true 3104 | }, 3105 | "lines": true, 3106 | "linewidth": 1, 3107 | "links": [], 3108 | "maxPerRow": 6, 3109 | "nullPointMode": "null", 3110 | "options": { 3111 | "alertThreshold": true 3112 | }, 3113 | "percentage": false, 3114 | "pluginVersion": "7.2.0", 3115 | "pointradius": 5, 3116 | "points": false, 3117 | "renderer": "flot", 3118 | "seriesOverrides": [], 3119 | "spaceLength": 10, 3120 | "stack": false, 3121 | "steppedLine": false, 3122 | "targets": [ 3123 | { 3124 | "expr": "rate(node_disk_io_time_seconds_total{instance=~\"$node\"}[$interval])", 3125 | "format": "time_series", 3126 | "interval": "", 3127 | "intervalFactor": 1, 3128 | "legendFormat": "{{device}}_ IO time", 3129 | "refId": "C" 3130 | } 3131 | ], 3132 | "thresholds": [], 3133 | "timeFrom": null, 3134 | "timeRegions": [], 3135 | "timeShift": null, 3136 | "title": "Time Spent Doing I/Os", 3137 | "tooltip": { 3138 | "shared": true, 3139 | "sort": 2, 3140 | "value_type": "individual" 3141 | }, 3142 | "type": "graph", 3143 | "xaxis": { 3144 | "buckets": null, 3145 | "mode": "time", 3146 | "name": null, 3147 | "show": true, 3148 | "values": [] 3149 | }, 3150 | "yaxes": [ 3151 | { 3152 | "$$hashKey": "object:3796", 3153 | "decimals": null, 3154 | "format": "percentunit", 3155 | "label": "", 3156 | "logBase": 1, 3157 | "max": null, 3158 | "min": null, 3159 | "show": true 3160 | }, 3161 | { 3162 | "$$hashKey": "object:3797", 3163 | "format": "short", 3164 | "label": null, 3165 | "logBase": 1, 3166 | "max": null, 3167 | "min": null, 3168 | "show": false 3169 | } 3170 | ], 3171 | "yaxis": { 3172 | "align": false, 3173 | "alignLevel": null 3174 | } 3175 | }, 3176 | { 3177 | "aliasColors": { 3178 | "vda": "#6ED0E0" 3179 | }, 3180 | "bars": false, 3181 | "dashLength": 10, 3182 | "dashes": false, 3183 | "datasource": "${DS__VICTORIAMETRICS}", 3184 | "decimals": 2, 3185 | "description": "Time spent on each read/write operation", 3186 | "fieldConfig": { 3187 | "defaults": { 3188 | "custom": {}, 3189 | "links": [] 3190 | }, 3191 | "overrides": [] 3192 | }, 3193 | "fill": 1, 3194 | "fillGradient": 1, 3195 | "gridPos": { 3196 | "h": 9, 3197 | "w": 8, 3198 | "x": 16, 3199 | "y": 38 3200 | }, 3201 | "height": "300", 3202 | "hiddenSeries": false, 3203 | "id": 160, 3204 | "legend": { 3205 | "alignAsTable": true, 3206 | "avg": true, 3207 | "current": true, 3208 | "hideEmpty": true, 3209 | "hideZero": true, 3210 | "max": true, 3211 | "min": true, 3212 | "show": true, 3213 | "sort": "current", 3214 | "sortDesc": true, 3215 | "total": false, 3216 | "values": true 3217 | }, 3218 | "lines": true, 3219 | "linewidth": 2, 3220 | "links": [], 3221 | "nullPointMode": "null as zero", 3222 | "options": { 3223 | "alertThreshold": true 3224 | }, 3225 | "percentage": false, 3226 | "pluginVersion": "7.2.0", 3227 | "pointradius": 5, 3228 | "points": false, 3229 | "renderer": "flot", 3230 | "seriesOverrides": [ 3231 | { 3232 | "$$hashKey": "object:4023", 3233 | "alias": "/,*_Read time$/", 3234 | "transform": "negative-Y" 3235 | } 3236 | ], 3237 | "spaceLength": 10, 3238 | "stack": false, 3239 | "steppedLine": false, 3240 | "targets": [ 3241 | { 3242 | "expr": "rate(node_disk_read_time_seconds_total{instance=~\"$node\"}[$interval]) / rate(node_disk_reads_completed_total{instance=~\"$node\"}[$interval])", 3243 | "format": "time_series", 3244 | "hide": false, 3245 | "instant": false, 3246 | "interval": "", 3247 | "intervalFactor": 1, 3248 | "legendFormat": "{{device}}_Read time", 3249 | "refId": "B" 3250 | }, 3251 | { 3252 | "expr": "rate(node_disk_write_time_seconds_total{instance=~\"$node\"}[$interval]) / rate(node_disk_writes_completed_total{instance=~\"$node\"}[$interval])", 3253 | "format": "time_series", 3254 | "hide": false, 3255 | "instant": false, 3256 | "interval": "", 3257 | "intervalFactor": 1, 3258 | "legendFormat": "{{device}}_Write time", 3259 | "refId": "C" 3260 | }, 3261 | { 3262 | "expr": "rate(node_disk_io_time_seconds_total{instance=~\"$node\"}[$interval])", 3263 | "format": "time_series", 3264 | "hide": true, 3265 | "interval": "", 3266 | "intervalFactor": 1, 3267 | "legendFormat": "{{device}}", 3268 | "refId": "A", 3269 | "step": 10 3270 | }, 3271 | { 3272 | "expr": "rate(node_disk_io_time_weighted_seconds_total{instance=~\"$node\"}[$interval])", 3273 | "format": "time_series", 3274 | "hide": true, 3275 | "interval": "", 3276 | "intervalFactor": 1, 3277 | "legendFormat": "{{device}}_加权", 3278 | "refId": "D" 3279 | } 3280 | ], 3281 | "thresholds": [], 3282 | "timeFrom": null, 3283 | "timeRegions": [], 3284 | "timeShift": null, 3285 | "title": "Disk R/W Time(Reference: less than 100ms)(beta)", 3286 | "tooltip": { 3287 | "shared": true, 3288 | "sort": 2, 3289 | "value_type": "individual" 3290 | }, 3291 | "type": "graph", 3292 | "xaxis": { 3293 | "buckets": null, 3294 | "mode": "time", 3295 | "name": null, 3296 | "show": true, 3297 | "values": [] 3298 | }, 3299 | "yaxes": [ 3300 | { 3301 | "$$hashKey": "object:4030", 3302 | "format": "s", 3303 | "label": "Time read (-) / write (+)", 3304 | "logBase": 1, 3305 | "max": null, 3306 | "min": null, 3307 | "show": true 3308 | }, 3309 | { 3310 | "$$hashKey": "object:4031", 3311 | "format": "short", 3312 | "label": null, 3313 | "logBase": 1, 3314 | "max": null, 3315 | "min": null, 3316 | "show": false 3317 | } 3318 | ], 3319 | "yaxis": { 3320 | "align": false, 3321 | "alignLevel": null 3322 | } 3323 | }, 3324 | { 3325 | "aliasColors": { 3326 | "192.168.200.241:9100_TCP_alloc": "semi-dark-blue", 3327 | "TCP": "#6ED0E0", 3328 | "TCP_alloc": "blue" 3329 | }, 3330 | "bars": false, 3331 | "dashLength": 10, 3332 | "dashes": false, 3333 | "datasource": "${DS__VICTORIAMETRICS}", 3334 | "decimals": 2, 3335 | "description": "Sockets_used - Sockets currently in use\n\nCurrEstab - TCP connections for which the current state is either ESTABLISHED or CLOSE- WAIT\n\nTCP_alloc - Allocated sockets\n\nTCP_tw - Sockets wating close\n\nUDP_inuse - Udp sockets currently in use\n\nRetransSegs - TCP retransmission packets\n\nOutSegs - Number of packets sent by TCP\n\nInSegs - Number of packets received by TCP", 3336 | "fieldConfig": { 3337 | "defaults": { 3338 | "custom": {}, 3339 | "links": [] 3340 | }, 3341 | "overrides": [] 3342 | }, 3343 | "fill": 0, 3344 | "fillGradient": 0, 3345 | "gridPos": { 3346 | "h": 8, 3347 | "w": 16, 3348 | "x": 0, 3349 | "y": 47 3350 | }, 3351 | "height": "300", 3352 | "hiddenSeries": false, 3353 | "id": 158, 3354 | "interval": "", 3355 | "legend": { 3356 | "alignAsTable": true, 3357 | "avg": false, 3358 | "current": true, 3359 | "hideEmpty": true, 3360 | "hideZero": true, 3361 | "max": true, 3362 | "min": false, 3363 | "rightSide": true, 3364 | "show": true, 3365 | "sideWidth": null, 3366 | "sort": "current", 3367 | "sortDesc": true, 3368 | "total": false, 3369 | "values": true 3370 | }, 3371 | "lines": true, 3372 | "linewidth": 1, 3373 | "links": [], 3374 | "nullPointMode": "null", 3375 | "options": { 3376 | "alertThreshold": true 3377 | }, 3378 | "percentage": false, 3379 | "pluginVersion": "7.2.0", 3380 | "pointradius": 5, 3381 | "points": false, 3382 | "renderer": "flot", 3383 | "seriesOverrides": [ 3384 | { 3385 | "$$hashKey": "object:4103", 3386 | "alias": "/.*Sockets_used/", 3387 | "color": "#E02F44", 3388 | "lines": false, 3389 | "pointradius": 1, 3390 | "points": true, 3391 | "yaxis": 2 3392 | } 3393 | ], 3394 | "spaceLength": 10, 3395 | "stack": false, 3396 | "steppedLine": false, 3397 | "targets": [ 3398 | { 3399 | "expr": "node_netstat_Tcp_CurrEstab{instance=~'$node'}", 3400 | "format": "time_series", 3401 | "hide": false, 3402 | "instant": false, 3403 | "interval": "", 3404 | "intervalFactor": 1, 3405 | "legendFormat": "CurrEstab", 3406 | "refId": "A", 3407 | "step": 20 3408 | }, 3409 | { 3410 | "expr": "node_sockstat_TCP_tw{instance=~'$node'}", 3411 | "format": "time_series", 3412 | "interval": "", 3413 | "intervalFactor": 1, 3414 | "legendFormat": "TCP_tw", 3415 | "refId": "D" 3416 | }, 3417 | { 3418 | "expr": "node_sockstat_sockets_used{instance=~'$node'}", 3419 | "hide": false, 3420 | "interval": "30m", 3421 | "intervalFactor": 1, 3422 | "legendFormat": "Sockets_used", 3423 | "refId": "B" 3424 | }, 3425 | { 3426 | "expr": "node_sockstat_UDP_inuse{instance=~'$node'}", 3427 | "interval": "", 3428 | "legendFormat": "UDP_inuse", 3429 | "refId": "C" 3430 | }, 3431 | { 3432 | "expr": "node_sockstat_TCP_alloc{instance=~'$node'}", 3433 | "interval": "", 3434 | "legendFormat": "TCP_alloc", 3435 | "refId": "E" 3436 | }, 3437 | { 3438 | "expr": "rate(node_netstat_Tcp_PassiveOpens{instance=~'$node'}[$interval])", 3439 | "hide": true, 3440 | "interval": "", 3441 | "legendFormat": "{{instance}}_Tcp_PassiveOpens", 3442 | "refId": "G" 3443 | }, 3444 | { 3445 | "expr": "rate(node_netstat_Tcp_ActiveOpens{instance=~'$node'}[$interval])", 3446 | "hide": true, 3447 | "interval": "", 3448 | "legendFormat": "{{instance}}_Tcp_ActiveOpens", 3449 | "refId": "F" 3450 | }, 3451 | { 3452 | "expr": "rate(node_netstat_Tcp_InSegs{instance=~'$node'}[$interval])", 3453 | "interval": "", 3454 | "legendFormat": "Tcp_InSegs", 3455 | "refId": "H" 3456 | }, 3457 | { 3458 | "expr": "rate(node_netstat_Tcp_OutSegs{instance=~'$node'}[$interval])", 3459 | "interval": "", 3460 | "legendFormat": "Tcp_OutSegs", 3461 | "refId": "I" 3462 | }, 3463 | { 3464 | "expr": "rate(node_netstat_Tcp_RetransSegs{instance=~'$node'}[$interval])", 3465 | "hide": false, 3466 | "interval": "", 3467 | "legendFormat": "Tcp_RetransSegs", 3468 | "refId": "J" 3469 | }, 3470 | { 3471 | "expr": "rate(node_netstat_TcpExt_ListenDrops{instance=~'$node'}[$interval])", 3472 | "hide": true, 3473 | "interval": "", 3474 | "legendFormat": "", 3475 | "refId": "K" 3476 | } 3477 | ], 3478 | "thresholds": [], 3479 | "timeFrom": null, 3480 | "timeRegions": [], 3481 | "timeShift": null, 3482 | "title": "Network Sockstat", 3483 | "tooltip": { 3484 | "shared": true, 3485 | "sort": 2, 3486 | "value_type": "individual" 3487 | }, 3488 | "transformations": [], 3489 | "type": "graph", 3490 | "xaxis": { 3491 | "buckets": null, 3492 | "mode": "time", 3493 | "name": null, 3494 | "show": true, 3495 | "values": [] 3496 | }, 3497 | "yaxes": [ 3498 | { 3499 | "$$hashKey": "object:4118", 3500 | "format": "short", 3501 | "label": null, 3502 | "logBase": 1, 3503 | "max": null, 3504 | "min": null, 3505 | "show": true 3506 | }, 3507 | { 3508 | "$$hashKey": "object:4119", 3509 | "format": "short", 3510 | "label": "Total_Sockets_used", 3511 | "logBase": 1, 3512 | "max": null, 3513 | "min": null, 3514 | "show": true 3515 | } 3516 | ], 3517 | "yaxis": { 3518 | "align": false, 3519 | "alignLevel": null 3520 | } 3521 | }, 3522 | { 3523 | "aliasColors": { 3524 | "filefd_192.168.200.241:9100": "super-light-green", 3525 | "switches_192.168.200.241:9100": "semi-dark-red", 3526 | "使用的文件描述符_10.118.72.128:9100": "red", 3527 | "每秒上下文切换次数_10.118.71.245:9100": "yellow", 3528 | "每秒上下文切换次数_10.118.72.128:9100": "yellow" 3529 | }, 3530 | "bars": false, 3531 | "cacheTimeout": null, 3532 | "dashLength": 10, 3533 | "dashes": false, 3534 | "datasource": "${DS__VICTORIAMETRICS}", 3535 | "description": "", 3536 | "fieldConfig": { 3537 | "defaults": { 3538 | "custom": {}, 3539 | "links": [] 3540 | }, 3541 | "overrides": [] 3542 | }, 3543 | "fill": 0, 3544 | "fillGradient": 1, 3545 | "gridPos": { 3546 | "h": 8, 3547 | "w": 8, 3548 | "x": 16, 3549 | "y": 47 3550 | }, 3551 | "hiddenSeries": false, 3552 | "hideTimeOverride": false, 3553 | "id": 16, 3554 | "legend": { 3555 | "alignAsTable": false, 3556 | "avg": false, 3557 | "current": true, 3558 | "max": false, 3559 | "min": false, 3560 | "rightSide": false, 3561 | "show": true, 3562 | "total": false, 3563 | "values": true 3564 | }, 3565 | "lines": true, 3566 | "linewidth": 2, 3567 | "links": [], 3568 | "nullPointMode": "null", 3569 | "options": { 3570 | "alertThreshold": true 3571 | }, 3572 | "percentage": false, 3573 | "pluginVersion": "7.2.0", 3574 | "pointradius": 1, 3575 | "points": false, 3576 | "renderer": "flot", 3577 | "seriesOverrides": [ 3578 | { 3579 | "$$hashKey": "object:4197", 3580 | "alias": "switches", 3581 | "color": "#FADE2A", 3582 | "lines": false, 3583 | "pointradius": 1, 3584 | "points": true, 3585 | "yaxis": 2 3586 | }, 3587 | { 3588 | "$$hashKey": "object:4198", 3589 | "alias": "used filefd", 3590 | "color": "#F2495C" 3591 | } 3592 | ], 3593 | "spaceLength": 10, 3594 | "stack": false, 3595 | "steppedLine": false, 3596 | "targets": [ 3597 | { 3598 | "expr": "node_filefd_allocated{instance=~\"$node\"}", 3599 | "format": "time_series", 3600 | "instant": false, 3601 | "interval": "", 3602 | "intervalFactor": 5, 3603 | "legendFormat": "used filefd", 3604 | "refId": "B" 3605 | }, 3606 | { 3607 | "expr": "rate(node_context_switches_total{instance=~\"$node\"}[$interval])", 3608 | "interval": "", 3609 | "intervalFactor": 5, 3610 | "legendFormat": "switches", 3611 | "refId": "A" 3612 | }, 3613 | { 3614 | "expr": " (node_filefd_allocated{instance=~\"$node\"}/node_filefd_maximum{instance=~\"$node\"}) *100", 3615 | "format": "time_series", 3616 | "hide": true, 3617 | "instant": false, 3618 | "interval": "", 3619 | "intervalFactor": 5, 3620 | "legendFormat": "使用的文件描述符占比_{{instance}}", 3621 | "refId": "C" 3622 | } 3623 | ], 3624 | "thresholds": [], 3625 | "timeFrom": null, 3626 | "timeRegions": [], 3627 | "timeShift": null, 3628 | "title": "Open File Descriptor(left)/Context switches(right)", 3629 | "tooltip": { 3630 | "shared": true, 3631 | "sort": 2, 3632 | "value_type": "individual" 3633 | }, 3634 | "type": "graph", 3635 | "xaxis": { 3636 | "buckets": null, 3637 | "mode": "time", 3638 | "name": null, 3639 | "show": true, 3640 | "values": [] 3641 | }, 3642 | "yaxes": [ 3643 | { 3644 | "$$hashKey": "object:4219", 3645 | "format": "short", 3646 | "label": "used filefd", 3647 | "logBase": 1, 3648 | "max": null, 3649 | "min": null, 3650 | "show": true 3651 | }, 3652 | { 3653 | "$$hashKey": "object:4220", 3654 | "format": "short", 3655 | "label": "context_switches", 3656 | "logBase": 1, 3657 | "max": null, 3658 | "min": null, 3659 | "show": true 3660 | } 3661 | ], 3662 | "yaxis": { 3663 | "align": false, 3664 | "alignLevel": null 3665 | } 3666 | } 3667 | ], 3668 | "refresh": "", 3669 | "schemaVersion": 26, 3670 | "style": "dark", 3671 | "tags": [ 3672 | "Prometheus", 3673 | "node_exporter", 3674 | "StarsL.cn" 3675 | ], 3676 | "templating": { 3677 | "list": [ 3678 | { 3679 | "allValue": "", 3680 | "current": {}, 3681 | "datasource": "${DS__VICTORIAMETRICS}", 3682 | "definition": "label_values(origin_prometheus)", 3683 | "hide": 0, 3684 | "includeAll": false, 3685 | "label": "Origin_prom", 3686 | "multi": false, 3687 | "name": "origin_prometheus", 3688 | "options": [], 3689 | "query": "label_values(origin_prometheus)", 3690 | "refresh": 1, 3691 | "regex": "", 3692 | "skipUrlSync": false, 3693 | "sort": 5, 3694 | "tagValuesQuery": "", 3695 | "tags": [], 3696 | "tagsQuery": "", 3697 | "type": "query", 3698 | "useTags": false 3699 | }, 3700 | { 3701 | "allValue": null, 3702 | "current": {}, 3703 | "datasource": "${DS__VICTORIAMETRICS}", 3704 | "definition": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\"}, job)", 3705 | "hide": 0, 3706 | "includeAll": false, 3707 | "label": "JOB", 3708 | "multi": false, 3709 | "name": "job", 3710 | "options": [], 3711 | "query": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\"}, job)", 3712 | "refresh": 1, 3713 | "regex": "", 3714 | "skipUrlSync": false, 3715 | "sort": 5, 3716 | "tagValuesQuery": "", 3717 | "tags": [], 3718 | "tagsQuery": "", 3719 | "type": "query", 3720 | "useTags": false 3721 | }, 3722 | { 3723 | "allValue": null, 3724 | "current": {}, 3725 | "datasource": "${DS__VICTORIAMETRICS}", 3726 | "definition": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}, nodename)", 3727 | "hide": 0, 3728 | "includeAll": true, 3729 | "label": "Host", 3730 | "multi": false, 3731 | "name": "hostname", 3732 | "options": [], 3733 | "query": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}, nodename)", 3734 | "refresh": 1, 3735 | "regex": "", 3736 | "skipUrlSync": false, 3737 | "sort": 5, 3738 | "tagValuesQuery": "", 3739 | "tags": [], 3740 | "tagsQuery": "", 3741 | "type": "query", 3742 | "useTags": false 3743 | }, 3744 | { 3745 | "allFormat": "glob", 3746 | "allValue": null, 3747 | "current": {}, 3748 | "datasource": "${DS__VICTORIAMETRICS}", 3749 | "definition": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",nodename=~\"$hostname\"},instance)", 3750 | "hide": 0, 3751 | "includeAll": false, 3752 | "label": "Instance", 3753 | "multi": true, 3754 | "multiFormat": "regex values", 3755 | "name": "node", 3756 | "options": [], 3757 | "query": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",nodename=~\"$hostname\"},instance)", 3758 | "refresh": 1, 3759 | "regex": "", 3760 | "skipUrlSync": false, 3761 | "sort": 5, 3762 | "tagValuesQuery": "", 3763 | "tags": [], 3764 | "tagsQuery": "", 3765 | "type": "query", 3766 | "useTags": false 3767 | }, 3768 | { 3769 | "allFormat": "glob", 3770 | "allValue": null, 3771 | "current": {}, 3772 | "datasource": "${DS__VICTORIAMETRICS}", 3773 | "definition": "label_values(node_network_info{origin_prometheus=~\"$origin_prometheus\",device!~'tap.*|veth.*|br.*|docker.*|virbr.*|lo.*|cni.*'},device)", 3774 | "hide": 0, 3775 | "includeAll": true, 3776 | "label": "NIC", 3777 | "multi": true, 3778 | "multiFormat": "regex values", 3779 | "name": "device", 3780 | "options": [], 3781 | "query": "label_values(node_network_info{origin_prometheus=~\"$origin_prometheus\",device!~'tap.*|veth.*|br.*|docker.*|virbr.*|lo.*|cni.*'},device)", 3782 | "refresh": 1, 3783 | "regex": "", 3784 | "skipUrlSync": false, 3785 | "sort": 1, 3786 | "tagValuesQuery": "", 3787 | "tags": [], 3788 | "tagsQuery": "", 3789 | "type": "query", 3790 | "useTags": false 3791 | }, 3792 | { 3793 | "auto": false, 3794 | "auto_count": 100, 3795 | "auto_min": "10s", 3796 | "current": { 3797 | "selected": false, 3798 | "text": "2m", 3799 | "value": "2m" 3800 | }, 3801 | "hide": 0, 3802 | "label": "Interval", 3803 | "name": "interval", 3804 | "options": [ 3805 | { 3806 | "selected": false, 3807 | "text": "30s", 3808 | "value": "30s" 3809 | }, 3810 | { 3811 | "selected": false, 3812 | "text": "1m", 3813 | "value": "1m" 3814 | }, 3815 | { 3816 | "selected": true, 3817 | "text": "2m", 3818 | "value": "2m" 3819 | }, 3820 | { 3821 | "selected": false, 3822 | "text": "3m", 3823 | "value": "3m" 3824 | }, 3825 | { 3826 | "selected": false, 3827 | "text": "5m", 3828 | "value": "5m" 3829 | }, 3830 | { 3831 | "selected": false, 3832 | "text": "10m", 3833 | "value": "10m" 3834 | }, 3835 | { 3836 | "selected": false, 3837 | "text": "30m", 3838 | "value": "30m" 3839 | } 3840 | ], 3841 | "query": "30s,1m,2m,3m,5m,10m,30m", 3842 | "queryValue": "", 3843 | "refresh": 2, 3844 | "skipUrlSync": false, 3845 | "type": "interval" 3846 | }, 3847 | { 3848 | "allValue": null, 3849 | "current": {}, 3850 | "datasource": "${DS__VICTORIAMETRICS}", 3851 | "definition": "query_result(topk(1,sort_desc (max(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",instance=~'$node',fstype=~\"ext.?|xfs\",mountpoint!~\".*pods.*\"}) by (mountpoint))))", 3852 | "hide": 2, 3853 | "includeAll": false, 3854 | "label": "maxmount", 3855 | "multi": false, 3856 | "name": "maxmount", 3857 | "options": [], 3858 | "query": "query_result(topk(1,sort_desc (max(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",instance=~'$node',fstype=~\"ext.?|xfs\",mountpoint!~\".*pods.*\"}) by (mountpoint))))", 3859 | "refresh": 2, 3860 | "regex": "/.*\\\"(.*)\\\".*/", 3861 | "skipUrlSync": false, 3862 | "sort": 5, 3863 | "tagValuesQuery": "", 3864 | "tags": [], 3865 | "tagsQuery": "", 3866 | "type": "query", 3867 | "useTags": false 3868 | }, 3869 | { 3870 | "allValue": null, 3871 | "current": {}, 3872 | "datasource": "${DS__VICTORIAMETRICS}", 3873 | "definition": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",instance=~\"$node\"}, nodename)", 3874 | "hide": 2, 3875 | "includeAll": false, 3876 | "label": "show_hostname", 3877 | "multi": false, 3878 | "name": "show_hostname", 3879 | "options": [], 3880 | "query": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",instance=~\"$node\"}, nodename)", 3881 | "refresh": 1, 3882 | "regex": "", 3883 | "skipUrlSync": false, 3884 | "sort": 5, 3885 | "tagValuesQuery": "", 3886 | "tags": [], 3887 | "tagsQuery": "", 3888 | "type": "query", 3889 | "useTags": false 3890 | }, 3891 | { 3892 | "allValue": null, 3893 | "current": {}, 3894 | "datasource": "${DS__VICTORIAMETRICS}", 3895 | "definition": "query_result(count(node_uname_info{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}))", 3896 | "hide": 2, 3897 | "includeAll": false, 3898 | "label": "total_servers", 3899 | "multi": false, 3900 | "name": "total", 3901 | "options": [], 3902 | "query": "query_result(count(node_uname_info{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}))", 3903 | "refresh": 1, 3904 | "regex": "/{} (.*) .*/", 3905 | "skipUrlSync": false, 3906 | "sort": 0, 3907 | "tagValuesQuery": "", 3908 | "tags": [], 3909 | "tagsQuery": "", 3910 | "type": "query", 3911 | "useTags": false 3912 | } 3913 | ] 3914 | }, 3915 | "time": { 3916 | "from": "now-12h", 3917 | "to": "now" 3918 | }, 3919 | "timepicker": { 3920 | "hidden": false, 3921 | "now": true, 3922 | "refresh_intervals": [ 3923 | "15s", 3924 | "30s", 3925 | "1m", 3926 | "5m", 3927 | "15m", 3928 | "30m" 3929 | ], 3930 | "time_options": [ 3931 | "5m", 3932 | "15m", 3933 | "1h", 3934 | "6h", 3935 | "12h", 3936 | "24h", 3937 | "2d", 3938 | "7d", 3939 | "30d" 3940 | ] 3941 | }, 3942 | "timezone": "browser", 3943 | "title": "1 Node Exporter for Prometheus Dashboard EN 20201010", 3944 | "uid": "xfpJB9FGz", 3945 | "version": 2 3946 | } --------------------------------------------------------------------------------