[
  {
    "path": ".gitignore",
    "content": "certs/\ncluster/\nacme.json\nauth\nsettings.env\ntesting.sh\npackage.sh\n*.zip\ndemo.mov\nresolv.conf\nbootkube\nmanifests/grafana/grafana-credentials.yaml\ninstall.exp\nmanifests/container-linux/master-config.yaml.bak\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2017 Andrew Low\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "## :whale: Provision a Kubernetes / CoreOS Cluster on Linode\n[![Bash](https://img.shields.io/badge/language-Bash-green.svg)](https://github.com/kahkhang/kube-linode)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/kahkhang/kube-linode/master/LICENSE)\n[![Gitter](https://img.shields.io/gitter/room/kube-linode/support.svg)](https://gitter.im/kube-linode/support)\n\nAutomatically provision a scalable CoreOS/Kubernetes cluster on Linode with zero configuration.\n\n![Demo](demo.gif)\n\nThe cluster will comprise of a single Kubernetes master host with a custom number of worker nodes.\n\n### What's included\n* [Kubernetes 1.11.0](https://kubernetes.io/) with [Bootkube](https://github.com/kubernetes-incubator/bootkube)\n* Load Balancer and automatic SSL/TLS renewal using [Traefik](https://github.com/containous/traefik)\n* Distributed block storage with [Rook](https://github.com/rook/rook)\n* Pre-configured [Grafana](https://github.com/grafana/grafana) dashboard using [Kube-Prometheus](https://github.com/coreos/prometheus-operator/tree/master/contrib/kube-prometheus) with Rook and Traefik monitoring\n* Basic auth protected subdomains (assuming you are using example.com):\n  * https://kube.example.com ([Kubernetes Dashboard](https://github.com/kubernetes/dashboard))\n  * https://grafana.example.com ([Grafana](https://github.com/grafana/grafana))\n  * https://alertmanager.example.com ([Alert Manager](https://github.com/prometheus/alertmanager))\n  * https://prometheus.example.com ([Prometheus Web UI](https://github.com/prometheus/prometheus))\n  * https://traefik.example.com ([Traefik Web UI](https://github.com/containous/traefik#web-ui))\n### Usage\n```sh\ngit clone https://github.com/kahkhang/kube-linode\ncd kube-linode\nchmod +x kube-linode.sh\n```  \nJust run `./kube-linode.sh create` into your console, key in your configuration, then sit back and have a :coffee:!  \nSettings are stored in `settings.env`, or you can pass them in as key-value flags as such:  \n```sh\n./kube-linode.sh --no_of_workers=3 --api_key=12345\n```  \nTo increase the number of workers, modify `NO_OF_WORKERS` in `settings.env` as desired and run `./kube-linode.sh` again.  \nUse `kubectl` to control the cluster (e.g. `kubectl get nodes`)  \n<hr>\n\nIf you want to destroy the cluster created by kube-linode, you can run the following command:\n```sh\n./kube-linode.sh destroy\n```  \nA prompt will be given listing all the nodes which will be destroyed upon confirmation  .\n\n### Dependencies\nYou should have a Linode account, which you can get [here](https://www.linode.com/?r=0affaec6ca42ca06f5f2c2d3d8d1ceb354e222c1).\nYou should also have an API Key with a valid domain that uses [Linode's DNS servers](https://www.linode.com/docs/networking/dns/dns-manager-overview#set-domain-names-to-use-linodes-name-servers).\n\nOSX: ``` brew install jq openssl curl kubectl ```\n\nArch Linux: Follow the instructions [here](https://github.com/kahkhang/kube-linode/issues/4#issuecomment-311601422)\n\n### Acknowledgements\nThis script uses [Bootkube](https://github.com/kubernetes-incubator/bootkube) to bootstrap the initial cluster using [Linode's API](https://www.linode.com/api).\n"
  },
  {
    "path": "display.sh",
    "content": "#!/bin/bash\n\n_SPINNER_POS=0\nspinner() {\n    IFS=$'\\n'\n    local delay=0.05\n    local list=( $(echo -e '\\xe2\\xa0\\x8b')\n                 $(echo -e '\\xe2\\xa0\\x99')\n                 $(echo -e '\\xe2\\xa0\\xb9')\n                 $(echo -e '\\xe2\\xa0\\xb8')\n                 $(echo -e '\\xe2\\xa0\\xbc')\n                 $(echo -e '\\xe2\\xa0\\xb4')\n                 $(echo -e '\\xe2\\xa0\\xa6')\n                 $(echo -e '\\xe2\\xa0\\xa7')\n                 $(echo -e '\\xe2\\xa0\\x87')\n                 $(echo -e '\\xe2\\xa0\\x8f'))\n    local i=$_SPINNER_POS\n    local tempfile\n    tempfile=$(mktemp)\n\n    eval $2 >> $tempfile 2>/dev/null &\n    local pid=$!\n\n    tput sc\n    printf \"%s %s\" \"${list[i]}\" \"$1\"\n    tput el\n    tput rc\n\n    i=$(($i+1))\n    i=$(($i%10))\n\n    while [ \"$(ps a | awk '{print $1}' | grep $pid)\" ]; do\n        printf \"%s\" \"${list[i]}\"\n        i=$(($i+1))\n        i=$(($i%10))\n        sleep $delay\n        printf \"\\b\\b\\b\"\n    done\n    _SPINNER_POS=$i\n\n    if [ -z $3 ]; then :; else\n      eval $3=\\'\"$(cat $tempfile)\"\\'\n    fi\n    rm $tempfile\n}\n\narrow=\"$(echo -e '\\xe2\\x9d\\xaf')\"\nchecked=\"$(echo -e '\\xe2\\x97\\x89')\"\nunchecked=\"$(echo -e '\\xe2\\x97\\xaf')\"\n\nblack=\"$(tput setaf 0)\"\nred=\"$(tput setaf 1)\"\ngreen=\"$(tput setaf 2)\"\nyellow=\"$(tput setaf 3)\"\nblue=\"$(tput setaf 4)\"\nmagenta=\"$(tput setaf 5)\"\ncyan=\"$(tput setaf 6)\"\nwhite=\"$(tput setaf 7)\"\nbold=\"$(tput bold)\"\nnormal=\"$(tput sgr0)\"\ndim=$'\\e[2m'\n\nprint() {\n  echo \"$1\"\n  tput el\n}\n\njoin() {\n  local IFS=$'\\n'\n  local _join_list\n  eval _join_list=( '\"${'${1}'[@]}\"' )\n  local first=true\n  for item in ${_join_list[@]}; do\n    if [ \"$first\" = true ]; then\n      printf \"%s\" \"$item\"\n      first=false\n    else\n      printf \"${2-, }%s\" \"$item\"\n    fi\n  done\n}\n\nfunction gen_env_from_options() {\n  local IFS=$'\\n'\n  local _indices\n  local _env_names\n  local _checkbox_selected\n  eval _indices=( '\"${'${1}'[@]}\"' )\n  eval _env_names=( '\"${'${2}'[@]}\"' )\n\n  for i in $(gen_index ${#_env_names[@]}); do\n    _checkbox_selected[$i]=false\n  done\n\n  for i in ${_indices[@]}; do\n    _checkbox_selected[$i]=true\n  done\n\n  for i in $(gen_index ${#_env_names[@]}); do\n    printf \"%s=%s\\n\" \"${_env_names[$i]}\" \"${_checkbox_selected[$i]}\"\n  done\n}\n\non_default() {\n  true;\n}\n\non_keypress() {\n  local OLD_IFS\n  local IFS\n  local key\n  OLD_IFS=$IFS\n  local on_up=${1:-on_default}\n  local on_down=${2:-on_default}\n  local on_space=${3:-on_default}\n  local on_enter=${4:-on_default}\n  local on_left=${5:-on_default}\n  local on_right=${6:-on_default}\n  local on_ascii=${7:-on_default}\n  local on_backspace=${8:-on_default}\n  _break_keypress=false\n  while IFS=\"\" read -rsn1 key; do\n      case \"$key\" in\n      $'\\x1b')\n          read -rsn1 key\n          if [[ \"$key\" == \"[\" ]]; then\n              read -rsn1 key\n              case \"$key\" in\n              'A') eval $on_up;;\n              'B') eval $on_down;;\n              'D') eval $on_left;;\n              'C') eval $on_right;;\n              esac\n          fi\n          ;;\n      ' ') eval $on_space ' ';;\n      [a-z0-9A-Z\\!\\#\\$\\&\\+\\,\\-\\.\\/\\;\\=\\?\\@\\[\\]\\^\\_\\{\\}\\~]) eval $on_ascii $key;;\n      $'\\x7f') eval $on_backspace $key;;\n      '') eval $on_enter $key;;\n      esac\n      if [ $_break_keypress = true ]; then\n        break\n      fi\n  done\n  IFS=$OLD_IFS\n}\n\ngen_index() {\n  local k=$1\n  local l=0\n  if [ $k -gt 0 ]; then\n    for l in $(seq $k)\n    do\n       echo \"$l-1\" | bc\n    done\n  fi\n}\n\ncontrol_c() {\n  tput cub \"$(tput cols)\"\n  tput el\n  stty sane\n  tput cnorm\n  stty echo\n  exit $?\n}\n\nselect_indices() {\n  local _select_list\n  local _select_indices\n  local _select_selected=()\n  eval _select_list=( '\"${'${1}'[@]}\"' )\n  eval _select_indices=( '\"${'${2}'[@]}\"' )\n  local _select_var_name=$3\n  eval $_select_var_name\\=\\(\\)\n  for i in $(gen_index ${#_select_indices[@]}); do\n    eval $_select_var_name\\+\\=\\(\\\"\"${_select_list[${_select_indices[$i]}]}\"\\\"\\)\n  done\n}\n#!/bin/bash\nset -e\n\n\n\non_checkbox_input_up() {\n  remove_checkbox_instructions\n  tput cub \"$(tput cols)\"\n\n  if [ \"${_checkbox_selected[$_current_index]}\" = true ]; then\n    printf \" ${green}${checked}${normal} ${_checkbox_list[$_current_index]} ${normal}\"\n  else\n    printf \" ${unchecked} ${_checkbox_list[$_current_index]} ${normal}\"\n  fi\n  tput el\n\n  if [ $_current_index = 0 ]; then\n    _current_index=$((${#_checkbox_list[@]}-1))\n    tput cud $((${#_checkbox_list[@]}-1))\n    tput cub \"$(tput cols)\"\n  else\n    _current_index=$((_current_index-1))\n\n    tput cuu1\n    tput cub \"$(tput cols)\"\n    tput el\n  fi\n\n  if [ \"${_checkbox_selected[$_current_index]}\" = true ]; then\n    printf \"${cyan}${arrow}${green}${checked}${normal} ${_checkbox_list[$_current_index]} ${normal}\"\n  else\n    printf \"${cyan}${arrow}${normal}${unchecked} ${_checkbox_list[$_current_index]} ${normal}\"\n  fi\n}\n\non_checkbox_input_down() {\n  remove_checkbox_instructions\n  tput cub \"$(tput cols)\"\n\n  if [ \"${_checkbox_selected[$_current_index]}\" = true ]; then\n    printf \" ${green}${checked}${normal} ${_checkbox_list[$_current_index]} ${normal}\"\n  else\n    printf \" ${unchecked} ${_checkbox_list[$_current_index]} ${normal}\"\n  fi\n\n  tput el\n\n  if [ $_current_index = $((${#_checkbox_list[@]}-1)) ]; then\n    _current_index=0\n    tput cuu $((${#_checkbox_list[@]}-1))\n    tput cub \"$(tput cols)\"\n  else\n    _current_index=$((_current_index+1))\n    tput cud1\n    tput cub \"$(tput cols)\"\n    tput el\n  fi\n\n  if [ \"${_checkbox_selected[$_current_index]}\" = true ]; then\n    printf \"${cyan}${arrow}${green}${checked}${normal} ${_checkbox_list[$_current_index]} ${normal}\"\n  else\n    printf \"${cyan}${arrow}${normal}${unchecked} ${_checkbox_list[$_current_index]} ${normal}\"\n  fi\n}\n\non_checkbox_input_enter() {\n  local OLD_IFS\n  OLD_IFS=$IFS\n  _checkbox_selected_indices=()\n  _checkbox_selected_options=()\n  IFS=$'\\n'\n\n  for i in $(gen_index ${#_checkbox_list[@]}); do\n    if [ \"${_checkbox_selected[$i]}\" = true ]; then\n      _checkbox_selected_indices+=($i)\n      _checkbox_selected_options+=(\"${_checkbox_list[$i]}\")\n    fi\n  done\n\n  tput cud $((${#_checkbox_list[@]}-${_current_index}))\n  tput cub \"$(tput cols)\"\n\n  for i in $(seq $((${#_checkbox_list[@]}+1))); do\n    tput el1\n    tput el\n    tput cuu1\n  done\n  tput cub \"$(tput cols)\"\n\n  tput cuf $((${#prompt}+3))\n  printf \"${cyan}$(join _checkbox_selected_options)${normal}\"\n  tput el\n\n  tput cud1\n  tput cub \"$(tput cols)\"\n  tput el\n\n  _break_keypress=true\n  IFS=$OLD_IFS\n}\n\non_checkbox_input_space() {\n  remove_checkbox_instructions\n  tput cub \"$(tput cols)\"\n  tput el\n  if [ \"${_checkbox_selected[$_current_index]}\" = true ]; then\n    _checkbox_selected[$_current_index]=false\n  else\n    _checkbox_selected[$_current_index]=true\n  fi\n\n  if [ \"${_checkbox_selected[$_current_index]}\" = true ]; then\n    printf \"${cyan}${arrow}${green}${checked}${normal} ${_checkbox_list[$_current_index]} ${normal}\"\n  else\n    printf \"${cyan}${arrow}${normal}${unchecked} ${_checkbox_list[$_current_index]} ${normal}\"\n  fi\n}\n\nremove_checkbox_instructions() {\n  if [ $_first_keystroke = true ]; then\n    tput cuu $((${_current_index}+1))\n    tput cub \"$(tput cols)\"\n    tput cuf $((${#prompt}+3))\n    tput el\n    tput cud $((${_current_index}+1))\n    _first_keystroke=false\n  fi\n}\n\n_checkbox_input() {\n  local i\n  local j\n  prompt=$1\n  eval _checkbox_list=( '\"${'${2}'[@]}\"' )\n  _current_index=0\n  _first_keystroke=true\n\n  trap control_c SIGINT EXIT\n\n  stty -echo\n  tput civis\n\n  print \"${normal}${green}?${normal} ${bold}${prompt}${normal} ${dim}(Press <space> to select, <enter> to finalize)${normal}\"\n\n  for i in $(gen_index ${#_checkbox_list[@]}); do\n    _checkbox_selected[$i]=false\n  done\n\n  if [ -n \"$3\" ]; then\n    eval _selected_indices=( '\"${'${3}'[@]}\"' )\n    for i in ${_selected_indices[@]}; do\n      _checkbox_selected[$i]=true\n    done\n  fi\n\n  for i in $(gen_index ${#_checkbox_list[@]}); do\n    tput cub \"$(tput cols)\"\n    if [ $i = 0 ]; then\n      if [ \"${_checkbox_selected[$i]}\" = true ]; then\n        print \"${cyan}${arrow}${green}${checked}${normal} ${_checkbox_list[$i]} ${normal}\"\n      else\n        print \"${cyan}${arrow}${normal}${unchecked} ${_checkbox_list[$i]} ${normal}\"\n      fi\n    else\n      if [ \"${_checkbox_selected[$i]}\" = true ]; then\n        print \" ${green}${checked}${normal} ${_checkbox_list[$i]} ${normal}\"\n      else\n        print \" ${unchecked} ${_checkbox_list[$i]} ${normal}\"\n      fi\n    fi\n    tput el\n  done\n\n  for j in $(gen_index ${#_checkbox_list[@]}); do\n    tput cuu1\n  done\n\n  on_keypress on_checkbox_input_up on_checkbox_input_down on_checkbox_input_space on_checkbox_input_enter\n}\n\ncheckbox_input() {\n  _checkbox_input \"$1\" \"$2\"\n  _checkbox_input_output_var_name=$3\n  select_indices _checkbox_list _checkbox_selected_indices $_checkbox_input_output_var_name\n  unset _checkbox_list\n  unset _break_keypress\n  unset _first_keystroke\n  unset _current_index\n  unset _checkbox_input_output_var_name\n  unset _checkbox_selected_indices\n  unset _checkbox_selected_options\n}\n\ncheckbox_input_indices() {\n  _checkbox_input \"$1\" \"$2\" \"$3\"\n  _checkbox_input_output_var_name=$3\n\n  eval $_checkbox_input_output_var_name\\=\\(\\)\n  for i in $(gen_index ${#_checkbox_selected_indices[@]}); do\n    eval $_checkbox_input_output_var_name\\+\\=\\(${_checkbox_selected_indices[$i]}\\)\n  done\n\n  unset _checkbox_list\n  unset _break_keypress\n  unset _first_keystroke\n  unset _current_index\n  unset _checkbox_input_output_var_name\n  unset _checkbox_selected_indices\n  unset _checkbox_selected_options\n}\n#!/bin/bash\nset -e\n\n\n\non_list_input_up() {\n  remove_list_instructions\n  tput cub \"$(tput cols)\"\n\n  printf \"  ${_list_options[$_list_selected_index]}\"\n  tput el\n\n  if [ $_list_selected_index = 0 ]; then\n    _list_selected_index=$((${#_list_options[@]}-1))\n    tput cud $((${#_list_options[@]}-1))\n    tput cub \"$(tput cols)\"\n  else\n    _list_selected_index=$((_list_selected_index-1))\n\n    tput cuu1\n    tput cub \"$(tput cols)\"\n    tput el\n  fi\n\n  printf \"${cyan}${arrow} %s ${normal}\" \"${_list_options[$_list_selected_index]}\"\n}\n\non_list_input_down() {\n  remove_list_instructions\n  tput cub \"$(tput cols)\"\n\n  printf \"  ${_list_options[$_list_selected_index]}\"\n  tput el\n\n  if [ $_list_selected_index = $((${#_list_options[@]}-1)) ]; then\n    _list_selected_index=0\n    tput cuu $((${#_list_options[@]}-1))\n    tput cub \"$(tput cols)\"\n  else\n    _list_selected_index=$((_list_selected_index+1))\n    tput cud1\n    tput cub \"$(tput cols)\"\n    tput el\n  fi\n  printf \"${cyan}${arrow} %s ${normal}\" \"${_list_options[$_list_selected_index]}\"\n}\n\non_list_input_enter_space() {\n  local OLD_IFS\n  OLD_IFS=$IFS\n  IFS=$'\\n'\n\n  tput cud $((${#_list_options[@]}-${_list_selected_index}))\n  tput cub \"$(tput cols)\"\n\n  for i in $(seq $((${#_list_options[@]}+1))); do\n    tput el1\n    tput el\n    tput cuu1\n  done\n  tput cub \"$(tput cols)\"\n\n  tput cuf $((${#prompt}+3))\n  printf \"${cyan}${_list_options[$_list_selected_index]}${normal}\"\n  tput el\n\n  tput cud1\n  tput cub \"$(tput cols)\"\n  tput el\n\n  _break_keypress=true\n  IFS=$OLD_IFS\n}\n\nremove_list_instructions() {\n  if [ $_first_keystroke = true ]; then\n    tput cuu $((${_list_selected_index}+1))\n    tput cub \"$(tput cols)\"\n    tput cuf $((${#prompt}+3))\n    tput el\n    tput cud $((${_list_selected_index}+1))\n    _first_keystroke=false\n  fi\n}\n\n_list_input() {\n  local i\n  local j\n  prompt=$1\n  eval _list_options=( '\"${'${2}'[@]}\"' )\n\n  _list_selected_index=0\n  _first_keystroke=true\n\n  trap control_c SIGINT EXIT\n\n  stty -echo\n  tput civis\n\n  print \"${normal}${green}?${normal} ${bold}${prompt}${normal} ${dim}(Use arrow keys)${normal}\"\n\n  for i in $(gen_index ${#_list_options[@]}); do\n    tput cub \"$(tput cols)\"\n    if [ $i = 0 ]; then\n      print \"${cyan}${arrow} ${_list_options[$i]} ${normal}\"\n    else\n      print \"  ${_list_options[$i]}\"\n    fi\n    tput el\n  done\n\n  for j in $(gen_index ${#_list_options[@]}); do\n    tput cuu1\n  done\n\n  on_keypress on_list_input_up on_list_input_down on_list_input_enter_space on_list_input_enter_space\n\n}\n\n\nlist_input() {\n  _list_input \"$1\" \"$2\"\n  local var_name=$3\n  eval $var_name=\\'\"${_list_options[$_list_selected_index]}\"\\'\n  unset _list_selected_index\n  unset _list_options\n  unset _break_keypress\n  unset _first_keystroke\n}\n\nlist_input_index() {\n  _list_input \"$1\" \"$2\"\n  local var_name=$3\n  eval $var_name=\\'\"$_list_selected_index\"\\'\n  unset _list_selected_index\n  unset _list_options\n  unset _break_keypress\n  unset _first_keystroke\n}\n#!/bin/bash\nset -e\n\n\n\non_text_input_left() {\n  remove_regex_failed\n  if [ $_current_pos -gt 0 ]; then\n    tput cub1\n    _current_pos=$(($_current_pos-1))\n  fi\n}\n\non_text_input_right() {\n  remove_regex_failed\n  if [ $_current_pos -lt ${#_text_input} ]; then\n    tput cuf1\n    _current_pos=$(($_current_pos+1))\n  fi\n}\n\non_text_input_enter() {\n  remove_regex_failed\n\n  if [[ \"$_text_input\" =~ $_text_input_regex && \"$(eval $_text_input_validator \"$_text_input\")\" = true ]]; then\n    tput cub \"$(tput cols)\"\n    tput cuf $((${#_read_prompt}-19))\n    printf \"${cyan}${_text_input}${normal}\"\n    tput el\n    tput cud1\n    tput cub \"$(tput cols)\"\n    tput el\n    eval $var_name=\\'\"${_text_input}\"\\'\n    _break_keypress=true\n  else\n    _text_input_regex_failed=true\n    tput civis\n    tput cud1\n    tput cub \"$(tput cols)\"\n    tput el\n    printf \"${red}>>${normal} $_text_input_regex_failed_msg\"\n    tput cuu1\n    tput cub \"$(tput cols)\"\n    tput cuf $((${#_read_prompt}-19))\n    tput el\n    _text_input=\"\"\n    _current_pos=0\n    tput cnorm\n  fi\n}\n\non_text_input_ascii() {\n  remove_regex_failed\n  local c=$1\n\n  if [ \"$c\" = '' ]; then\n    c=' '\n  fi\n\n  local rest=\"${_text_input:$_current_pos}\"\n  _text_input=\"${_text_input:0:$_current_pos}$c$rest\"\n  _current_pos=$(($_current_pos+1))\n\n  tput civis\n  printf \"$c$rest\"\n  tput el\n  if [ ${#rest} -gt 0 ]; then\n    tput cub ${#rest}\n  fi\n  tput cnorm\n}\n\non_text_input_backspace() {\n  remove_regex_failed\n  if [ $_current_pos -gt 0 ]; then\n    local start=\"${_text_input:0:$(($_current_pos-1))}\"\n    local rest=\"${_text_input:$_current_pos}\"\n    _current_pos=$(($_current_pos-1))\n    tput cub 1\n    tput el\n    tput sc\n    printf \"$rest\"\n    tput rc\n    _text_input=\"$start$rest\"\n  fi\n}\n\nremove_regex_failed() {\n  if [ $_text_input_regex_failed = true ]; then\n    _text_input_regex_failed=false\n    tput sc\n    tput cud1\n    tput el1\n    tput el\n    tput rc\n  fi\n}\n\ntext_input_default_validator() {\n  echo true;\n}\n\ntext_input() {\n  local prompt=$1\n  local var_name=$2\n  local _text_input_regex=\"${3:-\"\\.+\"}\"\n  local _text_input_regex_failed_msg=${4:-\"Input validation failed\"}\n  local _text_input_validator=${5:-text_input_default_validator}\n  local _read_prompt_start=$'\\e[32m?\\e[39m\\e[1m'\n  local _read_prompt_end=$'\\e[22m'\n  local _read_prompt=\"$( echo \"$_read_prompt_start ${prompt} $_read_prompt_end\")\"\n  local _current_pos=0\n  local _text_input_regex_failed=false\n  local _text_input=\"\"\n  printf \"$_read_prompt\"\n\n\n  trap control_c SIGINT EXIT\n\n  stty -echo\n  tput cnorm\n\n  on_keypress on_default on_default on_text_input_ascii on_text_input_enter on_text_input_left on_text_input_right on_text_input_ascii on_text_input_backspace\n  eval $var_name=\\'\"${_text_input}\"\\'\n}\n"
  },
  {
    "path": "install-coreos.sh",
    "content": "#!/bin/bash\nset -euo pipefail\n[[ -n \"$REBOOT_STRATEGY\" ]] || die \"Need a reboot strategy. Run with eg. '\\$REBOOT_STRATEGY=off ./install-coreos.sh'\"\n\nPUBLIC_IP=$(ip addr show eth0 | grep \"inet\\b\" | grep \"/24\" | awk '{print $2}' | cut -d/ -f1)\nPRIVATE_IP=$(ip addr show eth0 | grep \"inet\\b\" | grep \"/17\" | awk '{print $2}' | cut -d/ -f1)\n\nwget --quiet --no-check-certificate https://github.com/coreos/container-linux-config-transpiler/releases/download/v0.5.0/ct-v0.5.0-x86_64-unknown-linux-gnu -O ct\nchmod +x ct\napt-get -y install gawk\nwget --quiet https://raw.githubusercontent.com/coreos/init/master/bin/coreos-install\nchmod u+x coreos-install\n\ncat container-linux-config.yaml \\\n  | sed \"s/#SSH_KEY#/$(cat ~/.ssh/authorized_keys | grep '^ssh-rsa' | sed -n 1p | sed 's/\\//\\\\\\//g')/g\" \\\n  | sed \"s/#COREOS_PUBLIC_IPV4#/$PUBLIC_IP/g\" \\\n  | sed \"s/#COREOS_PRIVATE_IPV4#/$PRIVATE_IP/g\" \\\n  | sed \"s/#HOSTNAME#/$(echo $PUBLIC_IP | sed \"s/\\./-/g\")/g\" \\\n  | sed \"s/#GATEWAY#/${PUBLIC_IP%.*}.1/g\" \\\n  | sed \"s/#DNS#/$(cat /etc/resolv.conf | awk '/^nameserver /{ print $0 }' | sed 's/nameserver //g' | tr '\\n' ' ')/g\" \\\n  | sed \"s/#REBOOT_STRATEGY#/${REBOOT_STRATEGY}/g\" \\\n  | ./ct > container-linux-config.json\n./coreos-install -d /dev/sda -i container-linux-config.json\n"
  },
  {
    "path": "kube-linode.sh",
    "content": "#!/bin/bash\nset +e\nbase64_args=\"\"\n$(base64 --wrap=0 <(echo \"test\") >/dev/null 2>&1)\nif [ $? -eq 0 ]; then\n    base64_args=\"--wrap=0\"\nfi\nset -e\n\nsource display.sh\nsource linode-utilities.sh\n\ncheck_dep jq\ncheck_dep openssl\ncheck_dep curl\ncheck_dep htpasswd\ncheck_dep kubectl\ncheck_dep ssh\ncheck_dep base64\ncheck_dep bc\ncheck_dep ssh-keygen\ncheck_dep openssl\ncheck_dep awk\ncheck_dep sed\ncheck_dep cat\ncheck_dep tr\n\nif [[ \"$1\" != \"create\" && \"$1\" != \"destroy\" ]]; then\n  echo \"${bold}${red}Not a valid action!${normal}\"\n  echo \"Type ${green}./kube-linode.sh create${normal} to create a cluster\"\n  echo \"Type ${green}./kube-linode.sh destroy${normal} to destroy created cluster\"\n  exit 1\nfi\n\nunset DATACENTER_ID\nunset MASTER_PLAN\nunset WORKER_PLAN\nunset DOMAIN\nunset EMAIL\nunset MASTER_ID\nunset API_KEY\nunset USERNAME\nunset NO_OF_WORKERS\nunset REBOOT_STRATEGY\nunset WORKER_IDS\n\nstty -echo\ntput civis\n\nif [ -f settings.env ] ; then\n    . settings.env\nelse\n    touch settings.env\nfi\n\n# -- command line argument overrides --\noptions=$@\n\nfor argument in $options\n  do\n    case $argument in\n      --datacenter_id=*)           DATACENTER_ID=${argument/*=/\"\"} ;;\n      --master_plan=*)             MASTER_PLAN=${argument/*=/\"\"} ;;\n      --worker_plan=*)             WORKER_PLAN=${argument/*=/\"\"} ;;\n      --no_of_workers=*)           NO_OF_WORKERS=${argument/*=/\"\"} ;;\n      --domain=*)                  DOMAIN=${argument/*=/\"\"} ;;\n      --email=*)                   EMAIL=${argument/*=/\"\"} ;;\n      --master_id=*)               MASTER_ID=${argument/*=/\"\"} ;;\n      --api_key=*)                 API_KEY=${argument/*=/\"\"} ;;\n      --username=*)                USERNAME=${argument/*=/\"\"} ;;\n      --install_k8s_dashboard=*)   INSTALL_K8S_DASHBOARD=${argument/*=/\"\"} ;;\n      --install_traefik=*)         INSTALL_TRAEFIK=${argument/*=/\"\"} ;;\n      --install_rook=*)            INSTALL_ROOK=${argument/*=/\"\"} ;;\n      --install_prometheus=*)      INSTALL_PROMETHEUS=${argument/*=/\"\"} ;;\n      --reboot_strategy=*)         REBOOT_STRATEGY=${argument/*=/\"\"} ;;\n    esac\n  done\n\nread_api_key\nread_datacenter\nread_master_plan\nread_worker_plan\nread_domain\nread_email\nread_no_of_workers\nread_username\nread_install_options\nread_reboot_strategy\n\nif [[ ! ( -f ~/.ssh/id_rsa && -f ~/.ssh/id_rsa.pub ) ]]; then\n    spinner \"Generating new SSH key\" \"ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N \\\"\\\"\"\nelse\n    eval `ssh-agent -s` >/dev/null 2>&1\n    ssh-add -l | grep -q \"$(ssh-keygen -lf ~/.ssh/id_rsa  | awk '{print $2}')\" || ssh-add ~/.ssh/id_rsa >/dev/null 2>&1\nfi\n\nif [[ -f auth && -f manifests/grafana/grafana-credentials.yaml ]]  ; then : ; else\n    read -s -p \"${green}?${normal}${bold} Enter your dashboard password: ${normal}\" PASSWORD\n    tput cub \"$(tput cols)\"\n    tput el\n    [ -e auth ] && rm auth\n    htpasswd -b -c auth $USERNAME $PASSWORD >/dev/null 2>&1\n    [ -e manifests/grafana/grafana-credentials.yaml ] && rm manifests/grafana/grafana-credentials.yaml\ncat > manifests/grafana/grafana-credentials.yaml <<-EOF\napiVersion: v1\nkind: Secret\nmetadata:\n  name: grafana-credentials\ndata:\n  user: $( echo -n $USERNAME | base64 $base64_args )\n  password: $( echo -n $PASSWORD | base64 $base64_args )\nEOF\nfi\n\nif [ \"$1\" == \"destroy\" ]; then\n  spinner \"Retrieving master linode (if any)\" get_master_id MASTER_ID\n  if ! [[ $MASTER_ID =~ ^[0-9]+$ ]] 2>/dev/null; then\n    tput el\n    echo \"${red}No master node found! Cluster is likely to have been deleted.${normal}\"\n  else\n    spinner \"Retrieving worker linodes (if any)\" list_worker_ids WORKER_IDS\n    tput el\n    echo \"${bold}${red}The following nodes will be deleted:${normal}\"\n    echo \"  ${cyan}${arrow}${normal} master_$MASTER_ID [https://manager.linode.com/linodes/dashboard/master_$MASTER_ID]\"\n    for WORKER_ID in $WORKER_IDS; do\n      echo \"  ${cyan}${arrow}${normal} worker_$WORKER_ID [https://manager.linode.com/linodes/dashboard/worker_$WORKER_ID]\"\n    done\n    text_input \"Are you sure you want to delete the cluster? [y/n] \" \\\n      response \"^[yn]$\" \"Please enter either 'y' or 'n'\"\n    tput civis\n\n    if [[ \"$response\" =~ ^y$ ]]; then\n      for WORKER_ID in $WORKER_IDS; do\n        spinner \"${CYAN}[$WORKER_ID]${NORMAL} Deleting worker node\" \"delete_linode $WORKER_ID\"\n      done\n      spinner \"${CYAN}[$MASTER_ID]${NORMAL} Deleting master node\" \"delete_linode $MASTER_ID\"\n    fi\n  fi\n  spinner \"Retrieving DNS record for $DOMAIN\" \"get_domains \\\"$DOMAIN\\\"\" DOMAIN_ID\n  if [[ $DOMAIN_ID =~ ^[0-9]+$ ]] 2>/dev/null; then\n    text_input \"Do you want to delete the DNS record for $DOMAIN? [y/n] \" \\\n      response \"^[yn]$\" \"Please enter either 'y' or 'n'\"\n    tput civis\n    if [[ \"$response\" =~ ^y$ ]]; then\n      spinner \"Deleting DNS record for $DOMAIN\" delete_domain\n    fi\n  fi\n\n  text_input \"Do you want to delete the current cluster configuration (including ~/.kube/config)? [y/n] \" \\\n    response \"^[yn]$\" \"Please enter either 'y' or 'n'\"\n  tput civis\n  if [[ \"$response\" =~ ^y$ ]]; then\n    [ -e manifests/grafana/grafana-credentials.yaml ] && rm manifests/grafana/grafana-credentials.yaml\n    [ -e cluster ] && rm -rf cluster\n    [ -e ~/.kube/config ] && rm ~/.kube/config\n    [ -e auth ] && rm auth\n    [ -e settings.env ] && rm settings.env\n    touch settings.env\n    echo \"API_KEY=$API_KEY\" >> settings.env\n  fi\nelif [ \"$1\" == \"create\" ]; then\n  spinner \"Retrieving master linode (if any)\" get_master_id MASTER_ID\n\n  if ! [[ $MASTER_ID =~ ^[0-9]+$ ]] 2>/dev/null; then\n     spinner \"Retrieving list of workers\" list_worker_ids WORKER_IDS\n     for WORKER_ID in $WORKER_IDS; do\n        spinner \"${CYAN}[$WORKER_ID]${NORMAL} Deleting worker (since certs are now invalid)\"\\\n                    \"linode_api linode.delete LinodeID=$WORKER_ID skipChecks=true\"\n     done\n\n     spinner \"Creating master linode\" \"create_linode $DATACENTER_ID $MASTER_PLAN\" MASTER_ID\n     spinner \"Adding private IP\" \"add_private_ip $MASTER_ID\"\n\n     spinner \"${CYAN}[$MASTER_ID]${NORMAL} Initializing labels\" \\\n             \"linode_api linode.update LinodeID=$MASTER_ID Label=\\\"master_${MASTER_ID}\\\" lpm_displayGroup=\\\"$DOMAIN (Unprovisioned)\\\"\"\n  fi\n\n  spinner \"${CYAN}[$MASTER_ID]${NORMAL} Getting public IP\" \"get_public_ip $MASTER_ID\" MASTER_IP\n  declare \"PUBLIC_$MASTER_ID=$MASTER_IP\"\n\n  spinner \"${CYAN}[$MASTER_IP]${NORMAL} Getting private IP\" \"get_private_ip $MASTER_ID\" PRIVATE_IP\n  declare \"PRIVATE_$MASTER_ID=$PRIVATE_IP\"\n\n  spinner \"${CYAN}[$MASTER_IP]${NORMAL} Retrieving provision status\" \"is_provisioned $MASTER_ID\" IS_PROVISIONED\n\n  if [ $IS_PROVISIONED = false ] ; then\n    update_dns $MASTER_ID\n    install master $MASTER_ID\n  fi\n\n  tput el\n  echo \"${CYAN}[$MASTER_IP]${NORMAL} Master provisioned\"\n\n  spinner \"${CYAN}[$MASTER_IP]${NORMAL} Retrieving current number of workers\" get_no_of_workers CURRENT_NO_OF_WORKERS\n  NO_OF_NEW_WORKERS=$( echo \"$NO_OF_WORKERS - $CURRENT_NO_OF_WORKERS\" | bc )\n\n  if [[ $NO_OF_NEW_WORKERS -gt 0 ]]; then\n      for WORKER in $( seq $NO_OF_NEW_WORKERS ); do\n          spinner \"Creating worker linode\" \"create_linode $DATACENTER_ID $WORKER_PLAN\" WORKER_ID\n          spinner \"Adding private IP\" \"add_private_ip $WORKER_ID\"\n          spinner \"Initializing labels\" \"change_to_unprovisioned $WORKER_ID worker\"\n      done\n  fi\n\n  spinner \"Retrieving list of workers\" list_worker_ids WORKER_IDS\n\n  for WORKER_ID in $WORKER_IDS; do\n     spinner \"${CYAN}[$WORKER_ID]${NORMAL} Getting public IP\" \"get_public_ip $WORKER_ID\" PUBLIC_IP\n     declare \"PUBLIC_$WORKER_ID=$PUBLIC_IP\"\n\n     spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Getting private IP\" \"get_private_ip $WORKER_ID\" PRIVATE_IP\n     declare \"PRIVATE_$WORKER_ID=$PRIVATE_IP\"\n\n     if [ \"$( is_provisioned $WORKER_ID )\" = false ] ; then\n       install worker $WORKER_ID\n     fi\n     tput el\n     echo \"${CYAN}[$PUBLIC_IP]${NORMAL} Worker provisioned\"\n  done\nfi\n\nwait\n\ntput cnorm\nstty echo\n"
  },
  {
    "path": "linode-utilities.sh",
    "content": "#!/bin/bash\nif [ -z \"${KUBECONFIG}\" ]; then\n    export KUBECONFIG=~/.kube/config\nfi\n\ncontrol_c() {\n  tput cub \"$(tput cols)\"\n  tput el\n  stty sane\n  tput cnorm\n  stty echo\n  exit $?\n}\n\ntrap control_c SIGINT\n\nCYAN=$(tput setaf 6)\nNORMAL=$(tput sgr0)\nBOLD=$(tput bold)\n\ncheck_dep() {\n    command -v $1 >/dev/null 2>&1 || { echo \"Please install \\`${BOLD}$1${NORMAL}\\` before running this script.\" >&2; exit 1; }\n}\n\nlinode_api() {\n    args=(-F \"api_action=$1\") ; shift\n    for arg in \"$@\" ; do\n        args+=(-F \"$arg\")\n    done\n    curl -s -X POST \"https://api.linode.com/\"  -H 'cache-control: no-cache' \\\n         -F \"api_key=$API_KEY\" \"${args[@]}\"\n}\n\nwait_jobs() {\n    LINODE_ID=$1\n    while true ; do\n        if ( linode_api linode.job.list LinodeID=$LINODE_ID pendingOnly=1 | jq -Mje '.DATA == []' >/dev/null ) ; then\n            break\n        fi\n        sleep 3\n    done\n}\n\nwait_boot() {\n    LINODE_ID=$1\n    while true ; do\n        if [[ $(linode_api linode.job.list LinodeID=$LINODE_ID | jq \".DATA\" | \\\n        \t        jq -c \"[ .[] | select(.LABEL == \\\"Lassie initiated boot: CoreOS\\\") | select(.HOST_SUCCESS == 1)]\" | \\\n        \t        jq \".[] | .JOBID\") =~ ^[0-9]+ ]]; then\n        \t\tbreak\n        fi\n        sleep 3\n    done\n    sleep 10\n}\n\nget_status() {\n  linode_api linode.list LinodeID=$1 | jq \".DATA\" | jq -c \".[] | .STATUS\" | sed -n 1p\n}\n\nlist_worker_ids() {\n  linode_api linode.list | jq \".DATA\" | jq -c \"[ .[] | select(.LPM_DISPLAYGROUP | contains (\\\"$DOMAIN\\\")) ]\" | jq -c \".[] | select(.LABEL | startswith(\\\"worker_\\\")) | .LINODEID\"\n}\n\nget_master_id() {\n  linode_api linode.list | jq \".DATA\" | jq -c \"[ .[] | select(.LPM_DISPLAYGROUP | contains (\\\"$DOMAIN\\\")) ]\" | jq -c \".[] | select(.LABEL | startswith(\\\"master_\\\")) | .LINODEID\" | sed -n 1p\n}\n\nis_provisioned() {\n  local IS_PROVISIONED=false\n  if [ $( linode_api linode.list LinodeID=$1 | jq \".DATA\" | jq -c \".[] | .LPM_DISPLAYGROUP == \\\"$DOMAIN\\\"\") = true ] ; then\n    IS_PROVISIONED=true\n  fi\n  echo $IS_PROVISIONED\n}\n\nshutdown() {\n  local LINODE_ID=$1\n  linode_api linode.shutdown LinodeID=$LINODE_ID >/dev/null\n  wait_jobs $LINODE_ID\n}\n\nget_disk_ids() {\n  local LINODE_ID=$1\n  linode_api linode.disk.list LinodeID=$LINODE_ID | jq \".DATA\" | jq -c \".[] | .DISKID\"\n}\n\nget_config_ids() {\n  local LINODE_ID=$1\n  linode_api linode.config.list LinodeID=$LINODE_ID | jq \".DATA\" | jq -c \".[] | .ConfigID\"\n}\n\nreset_linode() {\n    local LINODE_ID=$1\n    local DISK_IDS\n    local CONFIG_IDS\n    local STATUS\n    PUBLIC_IP=$(get_public_ip $LINODE_ID)\n\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Getting status\" \"get_status $LINODE_ID\" STATUS\n\n    if [ \"$STATUS\" = \"1\" ]; then\n      spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Shutting down linode\" \"shutdown $LINODE_ID\"\n    fi\n\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Retrieving disk list\" \"get_disk_ids $LINODE_ID\" DISK_IDS\n\n    for DISK_ID in $DISK_IDS; do\n        spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Deleting disk $DISK_ID\" \"linode_api linode.disk.delete LinodeID=$LINODE_ID DiskID=$DISK_ID\"\n    done\n\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Retrieving config list\" \"get_config_ids $LINODE_ID\" CONFIG_IDS\n\n    for CONFIG_ID in $CONFIG_IDS; do\n        spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Deleting config $CONFIG_ID\" \"linode_api linode.config.delete LinodeID=$LINODE_ID ConfigID=$CONFIG_ID\"\n    done\n\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Waiting for all jobs to complete\" \"wait_jobs $LINODE_ID\"\n}\n\nget_public_ip() {\n  local LINODE_ID=$1\n  local IP\n  eval IP=\\$PUBLIC_$LINODE_ID\n  if ! [[ $IP =~ ^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$ ]] 2>/dev/null; then\n      IP=\"$( linode_api linode.ip.list LinodeID=$LINODE_ID | jq -Mje '.DATA[] | select(.ISPUBLIC==1) | .IPADDRESS' | sed -n 1p )\"\n  fi\n  echo $IP\n}\n\nget_private_ip() {\n  local LINODE_ID=$1\n  local IP\n  eval IP=\\$PRIVATE_$LINODE_ID\n  if ! [[ $IP =~ ^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$ ]] 2>/dev/null; then\n      IP=\"$( linode_api linode.ip.list LinodeID=$LINODE_ID | jq -Mje '.DATA[] | select(.ISPUBLIC==0) | .IPADDRESS' | sed -n 1p )\"\n  fi\n  echo $IP\n}\n\nget_plan_id() {\n  local LINODE_ID=$1\n  linode_api linode.list LinodeID=$LINODE_ID | jq \".DATA[0].PLANID\"\n}\n\nget_max_disk_size() {\n  local PLAN=$1\n  echo \"$( linode_api avail.linodeplans PlanID=$PLAN | jq \".DATA[0].DISK\" )\" \"*1024\" | bc\n}\n\ncreate_raw_disk() {\n  local LINODE_ID=$1\n  local DISK_SIZE=$2\n  local LABEL=$3\n  linode_api linode.disk.create LinodeID=$LINODE_ID Label=\"$LABEL\" Type=raw Size=$DISK_SIZE | jq '.DATA.DiskID'\n}\n\ncreate_ext4_disk() {\n  local LINODE_ID=$1\n  local DISK_SIZE=$2\n  local LABEL=$3\n  linode_api linode.disk.create LinodeID=$LINODE_ID Label=\"$LABEL\" Type=ext4 Size=$DISK_SIZE | jq '.DATA.DiskID'\n}\n\ncreate_install_disk() {\n  linode_api linode.disk.createFromDistribution LinodeID=$LINODE_ID \\\n      DistributionID=140 Label=Installer Size=$INSTALL_DISK_SIZE \\\n      rootPass=\"$ROOT_PASSWORD\" rootSSHKey=\"$( cat ~/.ssh/id_rsa.pub )\" | jq \".DATA.DiskID\"\n}\n\ncreate_boot_configuration() {\n  linode_api linode.config.create LinodeID=$LINODE_ID KernelID=138 Label=\"Installer\" \\\n      DiskList=$DISK_ID,$INSTALL_DISK_ID RootDeviceNum=2 helper_network=true | jq \".DATA.ConfigID\"\n}\n\nboot_linode() {\n  local LINODE_ID=$1\n  local CONFIG_ID=$2\n  linode_api linode.boot LinodeID=$LINODE_ID ConfigID=$CONFIG_ID >/dev/null\n  wait_jobs $LINODE_ID\n}\n\nupdate_coreos_config() {\n  linode_api linode.config.update LinodeID=$LINODE_ID ConfigID=$CONFIG_ID Label=\"CoreOS\" \\\n      DiskList=$DISK_ID,$STORAGE_DISK_ID KernelID=213 RootDeviceNum=1 helper_network=false\n}\n\ntransfer_acme() {\n  IP=$1\n  ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -tt \"core@$IP\" \\\n  \"sudo truncate -s 0 /etc/traefik/acme/acme.json; echo '$( base64 $base64_args < acme.json )' \\\n   | base64 --decode | sudo tee --append /etc/traefik/acme/acme.json\" 2>/dev/null >/dev/null\n  ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -tt \"core@$IP\" \\\n  \"sudo chmod 600 /etc/traefik/acme/acme.json\" 2>/dev/null >/dev/null\n}\n\nchange_to_provisioned() {\n  local LINODE_ID=$1\n  local NODE_TYPE=$2\n  linode_api linode.update LinodeID=$LINODE_ID Label=\"${NODE_TYPE}_${LINODE_ID}\" lpm_displayGroup=\"$DOMAIN\"\n}\n\nchange_to_unprovisioned() {\n  local LINODE_ID=$1\n  local NODE_TYPE=$2\n  linode_api linode.update LinodeID=$LINODE_ID Label=\"${NODE_TYPE}_${LINODE_ID}\" lpm_displayGroup=\"$DOMAIN (Unprovisioned)\"\n}\n\ninstall_coreos() {\n  LINODE_ID=$1\n  NODE_TYPE=$2\n  PUBLIC_IP=$(get_public_ip $LINODE_ID)\n\n  set +e\n  while true; do scp -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \\\n    -r install-coreos.sh root@${PUBLIC_IP}:~/install-coreos.sh && break || sleep 5; done\n  while true; do scp -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \\\n    -r manifests/container-linux/${NODE_TYPE}-config.yaml root@${PUBLIC_IP}:~/container-linux-config.yaml && break || sleep 5; done\n  while true; do ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${PUBLIC_IP} \\\n    \"chmod +x ./install-coreos.sh\" && break || sleep 5; done\n  while true; do ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${PUBLIC_IP} \\\n    \"REBOOT_STRATEGY=${REBOOT_STRATEGY} ./install-coreos.sh\" && break || sleep 5; done\n  set -e\n}\n\ninstall() {\n    local NODE_TYPE\n    local LINODE_ID\n    local PLAN\n    local ROOT_PASSWORD\n    NODE_TYPE=$1\n    LINODE_ID=$2\n    PUBLIC_IP=$(get_public_ip $LINODE_ID)\n    reset_linode $LINODE_ID\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Generating root password\" \"openssl rand -base64 32\" ROOT_PASSWORD\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Retrieving current plan\" \"get_plan_id $LINODE_ID\" PLAN\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Retrieving maximum available disk size\" \"get_max_disk_size $PLAN\" TOTAL_DISK_SIZE\n\n    INSTALL_DISK_SIZE=2000\n    COREOS_DISK_SIZE=10240\n    STORAGE_DISK_SIZE=$((${TOTAL_DISK_SIZE}-${COREOS_DISK_SIZE}))\n\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Creating ${COREOS_DISK_SIZE}mb CoreOS disk\" \"create_raw_disk $LINODE_ID $COREOS_DISK_SIZE CoreOS\" DISK_ID\n\n    # Create the install OS disk from script\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Creating ${INSTALL_DISK_SIZE}mb install disk\" create_install_disk INSTALL_DISK_ID\n\n    # Configure the installer to boot\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Creating boot configuration\" create_boot_configuration CONFIG_ID\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Booting installer\" \"boot_linode $LINODE_ID $CONFIG_ID\"\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Installing CoreOS (might take a while)\" \"install_coreos $LINODE_ID $NODE_TYPE\"\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Shutting down CoreOS\" \"linode_api linode.shutdown LinodeID=$LINODE_ID\"\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Deleting install disk $INSTALL_DISK_ID\" \"linode_api linode.disk.delete LinodeID=$LINODE_ID DiskID=$INSTALL_DISK_ID\"\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Waiting for existing jobs to complete\" \"wait_jobs $LINODE_ID\"\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Creating ${STORAGE_DISK_SIZE}mb storage disk\" \"create_raw_disk $LINODE_ID $STORAGE_DISK_SIZE Storage\" STORAGE_DISK_ID\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Updating CoreOS config\" update_coreos_config\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Waiting for existing jobs to complete\" \"wait_jobs $LINODE_ID\"\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Booting CoreOS\" \"linode_api linode.boot LinodeID=$LINODE_ID ConfigID=$CONFIG_ID\"\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Waiting for CoreOS to be ready\" \"wait_jobs $LINODE_ID; sleep 20\"\n\n    if [ \"$NODE_TYPE\" = \"master\" ] ; then\n        if [ -e acme.json ] ; then\n            spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Transferring acme.json\" \"transfer_acme $PUBLIC_IP\"\n        fi\n    fi\n\n    spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Provisioning $NODE_TYPE node (might take a while)\" \"provision_$NODE_TYPE $PUBLIC_IP\" PROVISION_LOGS\n\n    if [ \"$( echo \"${PROVISION_LOGS}\" | tail -n1 )\" = \"provisioned $NODE_TYPE\" ]; then\n      spinner \"${CYAN}[$PUBLIC_IP]${NORMAL} Changing status to provisioned\" \"change_to_provisioned $LINODE_ID $NODE_TYPE\"\n    else\n      install $NODE_TYPE $LINODE_ID\n    fi\n}\n\nprovision_master() {\n  IP=$1\n  while true; do ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -tt \"core@$IP\" \\\n    \"sudo systemctl start bootkube\" && break || sleep 5; done\n  [ -e cluster ] && rm -rf cluster\n  mkdir cluster\n  ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no core@${IP} \"sudo chown -R core:core /opt/bootkube/assets\"\n  scp -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -r core@${IP}:/opt/bootkube/assets/* cluster\n  mkdir -p ~/.kube\n  [ -e ~/.kube/config.bak ] && rm ~/.kube/config.bak\n  [ -e ~/.kube/config ] && mv ~/.kube/config ~/.kube/config.bak\n  cp cluster/auth/kubeconfig ~/.kube/config\n  while true; do kubectl --namespace=kube-system create secret generic kubesecret --from-file auth --request-timeout 0 && break || sleep 5; done\n  cat <<EOF | kubectl apply --request-timeout 0 -f -\napiVersion: v1\nkind: Namespace\nmetadata:\n  name: monitoring\n---\napiVersion: v1\nkind: Namespace\nmetadata:\n  name: rook\nEOF\n  while true; do kubectl --namespace=monitoring create secret generic kubesecret --from-file auth --request-timeout 0 && break || sleep 5; done\n  while true; do kubectl apply -f manifests/heapster.yaml --request-timeout 0 && break || sleep 5; done\n  if [ $INSTALL_K8S_DASHBOARD = true ]; then\n    while true; do cat manifests/kube-dashboard.yaml | sed \"s/\\${DOMAIN}/${DOMAIN}/g\" | kubectl apply --request-timeout 0 --validate=false -f - && break || sleep 5; done\n  fi\n  if [ $INSTALL_TRAEFIK = true ]; then\n    while true; do cat manifests/traefik.yaml | sed \"s/\\${DOMAIN}/${DOMAIN}/g\" | sed \"s/\\$EMAIL/${EMAIL}/g\" | kubectl apply --request-timeout 0 --validate=false -f - && break || sleep 5; done\n  fi\n  echo \"provisioned master\"\n}\n\nprovision_worker() {\n  IP=$1\n  while true; do ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -tt \"core@$IP\" \\\n    \"echo started\" && break || sleep 5; done\n  scp -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no cluster/auth/kubeconfig core@${IP}:/home/core/kubeconfig 2>/dev/null >/dev/null\n  ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -tt \"core@$IP\" \"sudo ./bootstrap.sh\" 2>/dev/null >/dev/null\n  ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -tt \"core@$IP\" \"rm -rf /home/core/kubeconfig && rm -rf /home/core/bootstrap.sh\" 2>/dev/null >/dev/null\n  set +e\n  until kubectl get nodes > /dev/null 2>&1; do sleep 1; done\n\n  if [ $INSTALL_ROOK = true ]; then\n    if ! kubectl --namespace rook get pods --request-timeout 0 2>/dev/null | grep -q \"^rook-api\"; then\n      while true; do kubectl apply -f manifests/rook/rook-operator.yaml --request-timeout 0 && break || sleep 5; done\n      while true; do kubectl apply -f manifests/rook/rook-cluster.yaml --request-timeout 0 && break || sleep 5; done\n      while true; do kubectl apply -f manifests/rook/rook-storageclass.yaml --request-timeout 0 && break || sleep 5; done\n    fi\n  fi\n\n  if [ $INSTALL_PROMETHEUS = true ]; then\n    until kubectl get nodes > /dev/null 2>&1; do sleep 1; done\n    if ! kubectl --namespace monitoring get ingress --request-timeout 0 2>/dev/null | grep -q \"^prometheus-ingress\"; then\n      while true; do kubectl --namespace monitoring apply -f manifests/prometheus-operator --request-timeout 0 && break || sleep 5; done\n      printf \"Waiting for Operator to register third party objects...\"\n      until kubectl --namespace monitoring get servicemonitor > /dev/null 2>&1; do sleep 1; printf \".\"; done\n      until kubectl --namespace monitoring get prometheus > /dev/null 2>&1; do sleep 1; printf \".\"; done\n      until kubectl --namespace monitoring get alertmanager > /dev/null 2>&1; do sleep 1; printf \".\"; done\n      while true; do kubectl --namespace monitoring apply -f manifests/node-exporter --request-timeout 0 && break || sleep 5; done\n      while true; do kubectl --namespace monitoring apply -f manifests/kube-state-metrics --request-timeout 0 && break || sleep 5; done\n      while true; do kubectl --namespace monitoring apply -f manifests/grafana/grafana-credentials.yaml --request-timeout 0 && break || sleep 5; done\n      while true; do kubectl --namespace monitoring apply -f manifests/grafana --request-timeout 0 && break || sleep 5; done\n      while true; do find manifests/prometheus -type f ! -name prometheus-k8s-roles.yaml ! -name prometheus-k8s-role-bindings.yaml ! -name prometheus-k8s-ingress.yaml -exec kubectl --request-timeout 0 --namespace \"monitoring\" apply -f {} \\; && break || sleep 5; done\n      while true; do kubectl apply -f manifests/prometheus/prometheus-k8s-roles.yaml --request-timeout 0 && break || sleep 5; done\n      while true; do kubectl apply -f manifests/prometheus/prometheus-k8s-role-bindings.yaml --request-timeout 0 && break || sleep 5; done\n      while true; do kubectl --namespace monitoring apply -f manifests/alertmanager/ --request-timeout 0 && break || sleep 5; done\n      while true; do cat manifests/prometheus/prometheus-k8s-ingress.yaml | sed \"s/\\${DOMAIN}/${DOMAIN}/g\" | kubectl apply --request-timeout 0 --validate=false -f - && break || sleep 5; done\n    fi\n  fi\n\n  set -e\n  echo \"provisioned worker\"\n}\n\nread_api_key() {\n  local result=false\n  if ! [[ $API_KEY =~ ^[0-9a-zA-Z]+$ ]] 2>/dev/null; then\n      while ! [[ $API_KEY =~ ^-?[0-9a-zA-Z]+$ ]] 2>/dev/null; do\n         text_input \"Enter Linode API Key (https://manager.linode.com/profile/api) : \" API_KEY\n         tput civis\n      done\n      while true ; do\n         spinner \"Verifying API Key\" check_api_key result\n         if [ $result = true ] ; then\n           break\n         fi\n         text_input \"Enter Linode API Key (https://manager.linode.com/profile/api) : \" API_KEY\n         tput civis\n      done\n  else\n      while true ; do\n         spinner \"Verifying API Key\" check_api_key result\n         if [ $result = true ] ; then\n           break\n         fi\n         text_input \"Enter Linode API Key (https://manager.linode.com/profile/api) : \" API_KEY\n         tput civis\n      done\n  fi\n   sed -i.bak '/^API_KEY/d' settings.env\n   echo \"API_KEY=$API_KEY\" >> settings.env\n   rm settings.env.bak\n}\n\ncheck_api_key() {\n  if linode_api test.echo | jq -e \".ERRORARRAY == []\" >/dev/null; then\n    echo true\n  else\n    echo false\n  fi\n}\n\nget_plans() {\n  linode_api avail.linodeplans | jq \".DATA | sort_by(.PRICE)\"\n}\n\nread_install_options() {\n  if [[ -z $INSTALL_K8S_DASHBOARD || -z $INSTALL_TRAEFIK || -z $INSTALL_ROOK || -z $INSTALL_PROMETHEUS ]]; then\n    options=('K8S Dashboard' 'Traefik (Load Balancer)' 'Rook (Distributed Storage)' 'Prometheus (Monitoring)')\n    env_names=('INSTALL_K8S_DASHBOARD' 'INSTALL_TRAEFIK' 'INSTALL_ROOK' 'INSTALL_PROMETHEUS')\n    selected_indices=(0 1 2 3)\n    checkbox_input_indices \"What should be included in your cluster?\" options selected_indices\n    eval \"$(gen_env_from_options selected_indices env_names)\"\n    sed -i.bak '/^INSTALL_K8S_DASHBOARD/d' settings.env\n    sed -i.bak '/^INSTALL_TRAEFIK/d' settings.env\n    sed -i.bak '/^INSTALL_ROOK/d' settings.env\n    sed -i.bak '/^INSTALL_PROMETHEUS/d' settings.env\n    echo \"$(gen_env_from_options selected_indices env_names)\" >> settings.env\n    rm settings.env.bak\n  fi\n}\n\nread_master_plan() {\n  if ! [[ $MASTER_PLAN =~ ^[0-9]+$ ]] 2>/dev/null; then\n      while ! [[ $MASTER_PLAN =~ ^-?[0-9]+$ ]] 2>/dev/null; do\n         IFS=$'\\n'\n         spinner \"Retrieving plans\" get_plans plan_data\n         local plan_ids=($(echo $plan_data | jq -r '.[] | select(.RAM >= 2048) | .PLANID'))\n         local plan_list=($(echo $plan_data | jq -r '.[] | select(.RAM >= 2048) | [.RAM, .PRICE] | @csv' | \\\n           awk -v FS=\",\" '{ram=$1/1024; printf \"%3sGB (\\$%s/mo)%s\",ram,$2,ORS}' 2>/dev/null))\n         list_input_index \"Select a master plan (https://www.linode.com/pricing)\" plan_list selected_disk_id\n\n         MASTER_PLAN=${plan_ids[$selected_disk_id]}\n      done\n      echo \"MASTER_PLAN=$MASTER_PLAN\" >> settings.env\n  fi\n}\n\nread_worker_plan() {\n  if ! [[ $WORKER_PLAN =~ ^[0-9]+$ ]] 2>/dev/null; then\n      while ! [[ $WORKER_PLAN =~ ^-?[0-9]+$ ]] 2>/dev/null; do\n         IFS=$'\\n'\n         spinner \"Retrieving plans\" get_plans plan_data\n         tput el\n         local plan_ids=($(echo $plan_data | jq -r '.[] | select(.RAM >= 2048) | .PLANID'))\n         local plan_list=($(echo $plan_data | jq -r '.[] | select(.RAM >= 2048) | [.RAM, .PRICE] | @csv' | \\\n           awk -v FS=\",\" '{ram=$1/1024; printf \"%3sGB (\\$%s/mo)%s\",ram,$2,ORS}' 2>/dev/null))\n         list_input_index \"Select a worker plan (https://www.linode.com/pricing)\" plan_list selected_disk_id\n\n         WORKER_PLAN=${plan_ids[$selected_disk_id]}\n      done\n      echo \"WORKER_PLAN=$WORKER_PLAN\" >> settings.env\n  fi\n\n}\n\nget_datacenters() {\n  linode_api avail.datacenters | jq \".DATA | sort_by(.LOCATION)\"\n}\n\nread_datacenter() {\n  if ! [[ $DATACENTER_ID =~ ^[0-9]+$ ]] 2>/dev/null; then\n      while ! [[ $DATACENTER_ID =~ ^-?[0-9]+$ ]] 2>/dev/null; do\n         IFS=$'\\n'\n         spinner \"Retrieving datacenters\" get_datacenters datacenters_data\n         tput el\n         datacenters_ids=($(echo $datacenters_data | jq -r '.[] | .DATACENTERID'))\n         datacenters_list=($(echo $datacenters_data | jq -r '.[] | .LOCATION'))\n         list_input_index \"Select a datacenter\" datacenters_list selected_data_center_index\n         DATACENTER_ID=${datacenters_ids[$selected_data_center_index]}\n      done\n      echo \"DATACENTER_ID=$DATACENTER_ID\" >> settings.env\n  fi\n}\n\nread_domain() {\n  domain_regex=\"^([a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\\.)+[a-zA-Z]{2,}$\"\n  if ! [[ $DOMAIN =~ $domain_regex ]] 2>/dev/null; then\n      while ! [[ $DOMAIN =~ $domain_regex ]] 2>/dev/null; do\n         text_input \"Enter Domain Name: \" DOMAIN \"$domain_regex\" \"Please enter a valid domain name\"\n      done\n      echo \"DOMAIN=$DOMAIN\" >> settings.env\n  fi\n  tput civis\n}\n\nread_email() {\n  email_regex=\"^[a-z0-9!#\\$%&'*+/=?^_\\`{|}~-]+(\\.[a-z0-9!#$%&'*+/=?^_\\`{|}~-]+)*@([a-z0-9]([a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9]([a-z0-9-]*[a-z0-9])?\\$\"\n  if ! [[ $EMAIL =~ $email_regex ]] 2>/dev/null; then\n      while ! [[ $EMAIL =~ $email_regex ]] 2>/dev/null; do\n         text_input \"Enter Email (for ACME registration): \" EMAIL \"^[a-z0-9!#\\$%&'*+/=?^_\\`{|}~-]+(\\.[a-z0-9!#$%&'*+/=?^_\\`{|}~-]+)*@([a-z0-9]([a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9]([a-z0-9-]*[a-z0-9])?\\$\" \"Please enter a valid email\"\n      done\n      echo \"EMAIL=$EMAIL\" >> settings.env\n  fi\n  tput civis\n}\n\nread_username() {\n  if [ -z \"$USERNAME\" ]; then\n    [ -e auth ] && rm auth\n    [ -e manifests/grafana/grafana-credentials.yaml ] && rm manifests/grafana/grafana-credentials.yaml\n    text_input \"Enter dashboard username: \" USERNAME\n    echo \"USERNAME=$USERNAME\" >> settings.env\n  fi\n  tput civis\n}\n\nread_reboot_strategy() {\n  if [ -z \"$REBOOT_STRATEGY\" ]; then\n    strategies=(\"off\" \"etcd-lock\" \"reboot\")\n    list_input_index \"Select a update strategy (see https://coreos.com/os/docs/latest/update-strategies.html)\" strategies strategy\n    REBOOT_STRATEGY=${strategies[$strategy]}\n    echo \"REBOOT_STRATEGY=$REBOOT_STRATEGY\" >> settings.env\n  fi\n}\n\nget_domains() {\n  local DOMAIN=$1\n  linode_api domain.list | jq \".DATA\" | jq -c \".[] | select(.DOMAIN == \\\"$DOMAIN\\\") | .DOMAINID\"\n}\n\nget_resources() {\n  local DOMAIN_ID=$1\n  linode_api domain.resource.list DomainID=$DOMAIN_ID | jq \".DATA\"\n}\n\ncreate_A_domain() {\n  linode_api domain.resource.create DomainID=$DOMAIN_ID \\\n             TARGET=\"$IP\" TTL_SEC=0 PORT=80 PROTOCOL='' PRIORITY=10 WEIGHT=5 TYPE='A' NAME='' >/dev/null\n}\n\ncreate_CNAME_domain() {\n  linode_api domain.resource.create DomainID=$DOMAIN_ID \\\n             TARGET=\"$DOMAIN\" TTL_SEC=0 PORT=80 PROTOCOL=\"\" PRIORITY=10 WEIGHT=5 TYPE=\"CNAME\" NAME=\"*\" >/dev/null\n}\n\nget_ip_address_id() {\n  linode_api linode.ip.list | jq \".DATA\" | jq -c \".[] | select(.IPADDRESS == \\\"$IP\\\") | .IPADDRESSID\" | sed -n 1p\n}\n\nupdate_domain() {\n  linode_api domain.update DomainID=$DOMAIN_ID Domain=\"$DOMAIN\" TTL_sec=300 axfr_ips=\"none\" Expire_sec=604800 \\\n                           SOA_Email=\"$EMAIL\" Retry_sec=300 status=1 Refresh_sec=300 Type=master >/dev/null\n}\n\ncreate_domain() {\n  linode_api domain.create Domain=\"$DOMAIN\" TTL_sec=300 axfr_ips=\"none\" Expire_sec=604800 \\\n                           SOA_Email=\"$EMAIL\" Retry_sec=300 status=1 Refresh_sec=300 Type=master >/dev/null\n}\n\ndelete_domain() {\n  linode_api domain.delete DomainID=\"$DOMAIN_ID\" Domain=\"$DOMAIN\" >/dev/null\n}\n\nupdate_dns() {\n  local LINODE_ID=$1\n  local DOMAIN_ID\n  local IP\n  local RESOURCE_IDS\n  eval IP=\\$PUBLIC_$LINODE_ID\n  spinner \"${CYAN}[$IP]${NORMAL} Retrieving DNS record for $DOMAIN\" \"get_domains \\\"$DOMAIN\\\"\" DOMAIN_ID\n  if ! [[ $DOMAIN_ID =~ ^[0-9]+$ ]] 2>/dev/null; then\n    spinner \"${CYAN}[$IP]${NORMAL} Creating DNS record for $DOMAIN\" create_domain\n  fi\n  spinner \"${CYAN}[$IP]${NORMAL} Retrieving DNS record for $DOMAIN\" \"get_domains \\\"$DOMAIN\\\"\" DOMAIN_ID\n  spinner \"${CYAN}[$IP]${NORMAL} Updating DNS record for $DOMAIN\" update_domain\n\n  spinner \"${CYAN}[$IP]${NORMAL} Retrieving list of resources for $DOMAIN\" \"get_resources $DOMAIN_ID\" RESOURCE_LIST\n\n  IFS=$'\\n'\n  if ! [[ $(echo $RESOURCE_LIST | jq -c \".[] | select(.TYPE == \\\"A\\\" and .TARGET == \\\"$IP\\\") | .RESOURCEID\" | sed -n 1p) =~ ^[0-9]+$ ]] 2>/dev/null; then\n      RESOURCE_IDS=$(echo $RESOURCE_LIST | jq -c \".[] | select(.TYPE == \\\"A\\\" and .NAME == \\\"\\\") | .RESOURCEID\")\n      for RESOURCE_ID in $RESOURCE_IDS; do\n          spinner \"${CYAN}[$IP]${NORMAL} Deleting 'A' DNS record $RESOURCE_ID\" \"linode_api domain.resource.delete DomainID=$DOMAIN_ID ResourceID=$RESOURCE_ID\"\n      done\n      spinner \"${CYAN}[$IP]${NORMAL} Adding 'A' DNS record to $DOMAIN with target $IP\" create_A_domain\n  fi\n\n  if ! [[ $(echo $RESOURCE_LIST | jq -c \".[] | select(.TYPE == \\\"CNAME\\\" and .TARGET == \\\"$DOMAIN\\\") | .RESOURCEID\") =~ ^[0-9]+$ ]] 2>/dev/null; then\n      spinner \"${CYAN}[$IP]${NORMAL} Adding wildcard 'CNAME' record with target $DOMAIN\" create_CNAME_domain\n  fi\n}\n\nread_no_of_workers() {\n  if ! [[ $NO_OF_WORKERS =~ ^[0-9]+$ ]] 2>/dev/null; then\n      while ! [[ $NO_OF_WORKERS =~ ^[0-9]+$ ]] 2>/dev/null; do\n         text_input \"Enter number of workers: \" NO_OF_WORKERS \"^[0-9]+$\" \"Please enter a number\"\n      done\n      echo \"NO_OF_WORKERS=$NO_OF_WORKERS\" >> settings.env\n  fi\n  tput civis\n}\n\ncreate_linode() {\n  DATACENTER_ID=$1\n  PLAN_ID=$2\n  linode_api linode.create DatacenterID=$DATACENTER_ID PlanID=$PLAN_ID | jq \".DATA.LinodeID\"\n}\n\ndelete_linode() {\n  local LINODE_ID=\"$1\"\n  linode_api linode.delete LinodeID=$LINODE_ID skipChecks=true >/dev/null\n}\n\nadd_private_ip() {\n  local LINODE_ID=$1\n  linode_api linode.ip.addprivate LinodeID=$LINODE_ID\n}\n\nget_no_of_workers() {\n  echo \"$( list_worker_ids | wc -l ) + 0\" | bc\n}\n"
  },
  {
    "path": "manifests/alertmanager/alertmanager-config.yaml",
    "content": "apiVersion: v1\nkind: Secret\nmetadata:\n  name: alertmanager-main\ndata:\n  alertmanager.yaml: Z2xvYmFsOgogIHJlc29sdmVfdGltZW91dDogNW0Kcm91dGU6CiAgZ3JvdXBfYnk6IFsnam9iJ10KICBncm91cF93YWl0OiAzMHMKICBncm91cF9pbnRlcnZhbDogNW0KICByZXBlYXRfaW50ZXJ2YWw6IDEyaAogIHJlY2VpdmVyOiAnbnVsbCcKICByb3V0ZXM6CiAgLSBtYXRjaDoKICAgICAgYWxlcnRuYW1lOiBEZWFkTWFuc1N3aXRjaAogICAgcmVjZWl2ZXI6ICdudWxsJwpyZWNlaXZlcnM6Ci0gbmFtZTogJ251bGwnCg==\n"
  },
  {
    "path": "manifests/alertmanager/alertmanager-service.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  labels:\n    alertmanager: main\n  name: alertmanager-main\nspec:\n  ports:\n  - name: web\n    port: 9093\n    protocol: TCP\n  selector:\n    alertmanager: main\n"
  },
  {
    "path": "manifests/alertmanager/alertmanager.yaml",
    "content": "apiVersion: monitoring.coreos.com/v1\nkind: Alertmanager\nmetadata:\n  name: main\n  labels:\n    alertmanager: main\nspec:\n  replicas: 1\n  version: v0.14.0\n"
  },
  {
    "path": "manifests/container-linux/master-config.yaml",
    "content": "passwd:\n  users:\n    - name: core\n      ssh_authorized_keys:\n        - \"#SSH_KEY#\"\nstorage:\n  files:\n    - path: /etc/hostname\n      filesystem: root\n      mode: 0420\n      contents:\n        inline: |\n          #HOSTNAME#\n    - path: /etc/traefik/acme/acme.json\n      filesystem: root\n      contents:\n        inline: |\n      mode: 0600\n    - path: /etc/environment\n      filesystem: root\n      contents:\n        inline: |\n          COREOS_PUBLIC_IPV4=#COREOS_PUBLIC_IPV4#\n          COREOS_PRIVATE_IPV4=#COREOS_PRIVATE_IPV4#\n    - path: /etc/kubernetes/kubelet.env\n      filesystem: root\n      mode: 0644\n      contents:\n        inline: |\n          KUBELET_IMAGE_URL=docker://gcr.io/google_containers/hyperkube\n          KUBELET_IMAGE_TAG=v1.11.0\n    - path: /etc/sysctl.d/max-user-watches.conf\n      filesystem: root\n      contents:\n        inline: |\n          fs.inotify.max_user_watches=16184\n    - path: /opt/bootkube/bootkube-start\n      filesystem: root\n      mode: 0544\n      user:\n        id: 500\n      group:\n        id: 500\n      contents:\n        inline: |\n          #!/bin/bash\n          # Wrapper for bootkube start\n          set -e\n          # Move experimental manifests\n          [ -n \"$(ls /opt/bootkube/assets/manifests-*/* 2>/dev/null)\" ] && \\\n            mv /opt/bootkube/assets/manifests-*/* /opt/bootkube/assets/manifests && \\\n            rm -rf /opt/bootkube/assets/manifests-*\n\n          BOOTKUBE_ACI=\"${BOOTKUBE_ACI:-quay.io/coreos/bootkube}\"\n          BOOTKUBE_VERSION=\"${BOOTKUBE_VERSION:-v0.13.0}\"\n          BOOTKUBE_ASSETS=\"${BOOTKUBE_ASSETS:-/opt/bootkube/assets}\"\n\n          # ======== START OF RESOURCE RENDERING ===========\n          sudo mkdir -p /opt/bootkube /etc/kubernetes\n          [ -e /opt/bootkube/assets ] && sudo rm -rf /opt/bootkube/assets\n\n          sudo /usr/bin/rkt run \\\n            --trust-keys-from-https \\\n            --volume assets,kind=host,source=/opt/bootkube \\\n            --mount volume=assets,target=/opt/bootkube \\\n            --volume bootstrap,kind=host,source=/etc/kubernetes \\\n            --mount volume=bootstrap,target=/etc/kubernetes \\\n            ${RKT_OPTS} \\\n            ${BOOTKUBE_ACI}:${BOOTKUBE_VERSION} \\\n            --net=host \\\n            --dns=host \\\n            --exec=/bootkube -- render --asset-dir=/opt/bootkube/assets \\\n            --etcd-servers=https://#COREOS_PRIVATE_IPV4#:2379 \\\n            --network-provider=flannel \\\n            --api-servers=https://#COREOS_PUBLIC_IPV4#:6443,https://#COREOS_PRIVATE_IPV4#:6443\n\n          sudo mkdir -p /etc/kubernetes\n          sudo cp ${BOOTKUBE_ASSETS}/auth/kubeconfig /etc/kubernetes/\n          sudo cp ${BOOTKUBE_ASSETS}/tls/ca.crt /etc/kubernetes/ca.crt\n\n          sudo mkdir -p /etc/etcd/tls\n          sudo cp ${BOOTKUBE_ASSETS}/tls/etcd-* /etc/etcd/tls\n          sudo mkdir -p /etc/etcd/tls/etcd\n          sudo cp ${BOOTKUBE_ASSETS}/tls/etcd/* /etc/etcd/tls/etcd\n          sudo chown -R etcd:etcd /etc/etcd\n          sudo chmod -R u=rX,g=,o= /etc/etcd\n\n          sudo systemctl enable kubelet; sudo systemctl start kubelet\n          # ======= END OF RESOURCE RENDERING ========\n\n          exec /usr/bin/rkt run \\\n            --trust-keys-from-https \\\n            --volume assets,kind=host,source=${BOOTKUBE_ASSETS} \\\n            --mount volume=assets,target=/assets \\\n            --volume bootstrap,kind=host,source=/etc/kubernetes \\\n            --mount volume=bootstrap,target=/etc/kubernetes \\\n            ${RKT_OPTS} \\\n            ${BOOTKUBE_ACI}:${BOOTKUBE_VERSION} \\\n            --net=host \\\n            --dns=host \\\n            --exec=/bootkube -- start --asset-dir=/assets \"$@\"\nnetworkd:\n  units:\n    - name: 00-eth0.network\n      contents: |\n        [Match]\n        Name=eth0\n\n        [Network]\n        DHCP=no\n        DNS=#DNS#\n        Domains=members.linode.com\n        IPv6PrivacyExtensions=false\n        Gateway=#GATEWAY#\n        Address=#COREOS_PUBLIC_IPV4#/24\n        Address=#COREOS_PRIVATE_IPV4#/17\nsystemd:\n  units:\n    - name: etcd-member.service\n      enable: true\n      dropins:\n        - name: 40-etcd-cluster.conf\n          contents: |\n            [Service]\n            Environment=\"ETCD_IMAGE_TAG=v3.2.13\"\n            Environment=\"ETCD_NAME=controller\"\n            Environment=\"ETCD_INITIAL_CLUSTER=controller=https://#COREOS_PRIVATE_IPV4#:2380\"\n            Environment=\"ETCD_INITIAL_ADVERTISE_PEER_URLS=https://#COREOS_PRIVATE_IPV4#:2380\"\n            Environment=\"ETCD_ADVERTISE_CLIENT_URLS=https://#COREOS_PRIVATE_IPV4#:2379\"\n            Environment=\"ETCD_LISTEN_CLIENT_URLS=https://0.0.0.0:2379\"\n            Environment=\"ETCD_LISTEN_PEER_URLS=https://0.0.0.0:2380\"\n            Environment=\"ETCD_SSL_DIR=/etc/etcd/tls\"\n            Environment=\"ETCD_TRUSTED_CA_FILE=/etc/ssl/certs/etcd/server-ca.crt\"\n            Environment=\"ETCD_CERT_FILE=/etc/ssl/certs/etcd/server.crt\"\n            Environment=\"ETCD_KEY_FILE=/etc/ssl/certs/etcd/server.key\"\n            Environment=\"ETCD_CLIENT_CERT_AUTH=true\"\n            Environment=\"ETCD_PEER_TRUSTED_CA_FILE=/etc/ssl/certs/etcd/peer-ca.crt\"\n            Environment=\"ETCD_PEER_CERT_FILE=/etc/ssl/certs/etcd/peer.crt\"\n            Environment=\"ETCD_PEER_KEY_FILE=/etc/ssl/certs/etcd/peer.key\"\n    - name: docker.service\n      enable: true\n    - name: kubelet.path\n      enable: true\n      contents: |\n        [Unit]\n        Description=Watch for kubeconfig\n        [Path]\n        PathExists=/etc/kubernetes/kubeconfig\n        [Install]\n        WantedBy=multi-user.target\n    - name: wait-for-dns.service\n      enable: true\n      contents: |\n        [Unit]\n        Description=Wait for DNS entries\n        Wants=systemd-resolved.service\n        Before=kubelet.service\n        [Service]\n        Type=oneshot\n        RemainAfterExit=true\n        ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'\n        [Install]\n        RequiredBy=kubelet.service\n    - name: bootkube.service\n      contents: |\n        [Unit]\n        Description=Bootstrap a Kubernetes cluster\n        ConditionPathExists=!/opt/bootkube/init_bootkube.done\n        [Service]\n        Type=oneshot\n        RemainAfterExit=true\n        EnvironmentFile=/etc/environment\n        WorkingDirectory=/opt/bootkube\n        ExecStart=/opt/bootkube/bootkube-start\n        ExecStartPost=/bin/touch /opt/bootkube/init_bootkube.done\n        [Install]\n        WantedBy=multi-user.target\n    - name: kubelet.service\n      contents: |\n        [Unit]\n        Description=Kubelet via Hyperkube ACI\n        Wants=rpc-statd.service\n        [Service]\n        EnvironmentFile=/etc/kubernetes/kubelet.env\n        EnvironmentFile=/etc/environment\n        Environment=\"RKT_RUN_ARGS=--uuid-file-save=/var/cache/kubelet-pod.uuid \\\n          --volume=resolv,kind=host,source=/etc/resolv.conf \\\n          --mount volume=resolv,target=/etc/resolv.conf \\\n          --volume var-lib-cni,kind=host,source=/var/lib/cni \\\n          --mount volume=var-lib-cni,target=/var/lib/cni \\\n          --volume opt-cni-bin,kind=host,source=/opt/cni/bin \\\n          --mount volume=opt-cni-bin,target=/opt/cni/bin \\\n          --volume var-log,kind=host,source=/var/log \\\n          --mount volume=var-log,target=/var/log \\\n          --insecure-options=image\"\n        ExecStartPre=/bin/mkdir -p /opt/cni/bin\n        ExecStartPre=/bin/mkdir -p /etc/kubernetes/manifests\n        ExecStartPre=/bin/mkdir -p /etc/kubernetes/cni/net.d\n        ExecStartPre=/bin/mkdir -p /etc/kubernetes/checkpoint-secrets\n        ExecStartPre=/bin/mkdir -p /etc/kubernetes/inactive-manifests\n        ExecStartPre=/bin/mkdir -p /var/lib/cni\n        ExecStartPre=/bin/mkdir -p /var/lib/kubelet/volumeplugins\n        ExecStartPre=-/usr/bin/rkt rm --uuid-file=/var/cache/kubelet-pod.uuid\n        ExecStart=/usr/lib/coreos/kubelet-wrapper \\\n          --allow-privileged \\\n          --anonymous-auth=false \\\n          --client-ca-file=/etc/kubernetes/ca.crt \\\n          --cloud-provider= \\\n          --cluster_dns=10.3.0.10 \\\n          --cluster_domain=cluster.local \\\n          --cni-conf-dir=/etc/kubernetes/cni/net.d \\\n          --exit-on-lock-contention \\\n          --hostname-override=#COREOS_PUBLIC_IPV4# \\\n          --kubeconfig=/etc/kubernetes/kubeconfig \\\n          --lock-file=/var/run/lock/kubelet.lock \\\n          --network-plugin=cni \\\n          --node-labels=node-role.kubernetes.io/master \\\n          --pod-manifest-path=/etc/kubernetes/manifests \\\n          --register-with-taints=node-role.kubernetes.io/master=:NoSchedule \\\n          --volume-plugin-dir=/var/lib/kubelet/volumeplugins\n        ExecStop=-/usr/bin/rkt stop --uuid-file=/var/cache/kubelet-pod.uuid\n        Restart=always\n        RestartSec=10\n        [Install]\n        WantedBy=multi-user.target\nlocksmith:\n  reboot_strategy: #REBOOT_STRATEGY#\n"
  },
  {
    "path": "manifests/container-linux/worker-config.yaml",
    "content": "passwd:\n  users:\n    - name: core\n      ssh_authorized_keys:\n        - \"#SSH_KEY#\"\nstorage:\n  files:\n    - path: /etc/hostname\n      filesystem: root\n      mode: 0420\n      contents:\n        inline: |\n          #HOSTNAME#\n    - path: /etc/kubernetes/kubelet.env\n      filesystem: root\n      mode: 0644\n      contents:\n        inline: |\n          KUBELET_IMAGE_URL=docker://gcr.io/google_containers/hyperkube\n          KUBELET_IMAGE_TAG=v1.11.0\n    - path: /etc/sysctl.d/max-user-watches.conf\n      filesystem: root\n      contents:\n        inline: |\n          fs.inotify.max_user_watches=16184\n    - path: /etc/kubernetes/delete-node\n      filesystem: root\n      mode: 0744\n      contents:\n        inline: |\n          #!/bin/bash\n          set -e\n          exec /usr/bin/rkt run \\\n            --trust-keys-from-https \\\n            --volume config,kind=host,source=/etc/kubernetes \\\n            --mount volume=config,target=/etc/kubernetes \\\n            --insecure-options=image \\\n            docker://gcr.io/google_containers/hyperkube:v1.9.3 \\\n            --net=host \\\n            --dns=host \\\n            --exec=/kubectl -- --kubeconfig=/etc/kubernetes/kubeconfig delete node #COREOS_PUBLIC_IPV4#\n    - path: /etc/environment\n      filesystem: root\n      contents:\n        inline: |\n          COREOS_PUBLIC_IPV4=#COREOS_PUBLIC_IPV4#\n          COREOS_PRIVATE_IPV4=#COREOS_PRIVATE_IPV4#\n      mode: 0644\n    - path: /home/core/bootstrap.sh\n      filesystem: root\n      contents:\n        inline: |\n          #!/usr/bin/env bash\n          set -euo pipefail\n\n          # Setup kubeconfig\n          mkdir -p /etc/kubernetes\n          cp /home/core/kubeconfig /etc/kubernetes/kubeconfig\n          # Pulled out of the kubeconfig. Other installations should place the root\n          # CA here manually.\n          grep 'certificate-authority-data' /home/core/kubeconfig | awk '{print $2}' | base64 -d > /etc/kubernetes/ca.crt\n\n          # Start services\n          systemctl daemon-reload\n          systemctl stop update-engine\n          systemctl mask update-engine\n          systemctl enable kubelet\n          sudo systemctl start kubelet\n      mode: 0700\nnetworkd:\n  units:\n    - name: 00-eth0.network\n      contents: |\n        [Match]\n        Name=eth0\n\n        [Network]\n        DHCP=no\n        DNS=#DNS#\n        Domains=members.linode.com\n        IPv6PrivacyExtensions=false\n        Gateway=#GATEWAY#\n        Address=#COREOS_PUBLIC_IPV4#/24\n        Address=#COREOS_PRIVATE_IPV4#/17\nsystemd:\n  units:\n    - name: docker.service\n      enable: true\n    - name: kubelet.path\n      enable: true\n      contents: |\n        [Unit]\n        Description=Watch for kubeconfig\n        [Path]\n        PathExists=/etc/kubernetes/kubeconfig\n        [Install]\n        WantedBy=multi-user.target\n    - name: wait-for-dns.service\n      enable: true\n      contents: |\n        [Unit]\n        Description=Wait for DNS entries\n        Wants=systemd-resolved.service\n        Before=kubelet.service\n        [Service]\n        Type=oneshot\n        RemainAfterExit=true\n        ExecStart=/bin/sh -c 'while ! /usr/bin/grep '^[^#[:space:]]' /etc/resolv.conf > /dev/null; do sleep 1; done'\n        [Install]\n        RequiredBy=kubelet.service\n    - name: delete-node.service\n      enable: true\n      contents: |\n        [Unit]\n        Description=Waiting to delete Kubernetes node on shutdown\n        [Service]\n        Type=oneshot\n        RemainAfterExit=true\n        ExecStart=/bin/true\n        ExecStop=/etc/kubernetes/delete-node\n        [Install]\n        WantedBy=multi-user.target\n    - name: kubelet.service\n      contents: |\n        [Unit]\n        Description=Kubelet via Hyperkube ACI\n        Wants=rpc-statd.service\n        [Service]\n        EnvironmentFile=/etc/kubernetes/kubelet.env\n        EnvironmentFile=/etc/environment\n        Environment=\"RKT_RUN_ARGS=--uuid-file-save=/var/cache/kubelet-pod.uuid \\\n          --volume=resolv,kind=host,source=/etc/resolv.conf \\\n          --mount volume=resolv,target=/etc/resolv.conf \\\n          --volume var-lib-cni,kind=host,source=/var/lib/cni \\\n          --mount volume=var-lib-cni,target=/var/lib/cni \\\n          --volume opt-cni-bin,kind=host,source=/opt/cni/bin \\\n          --mount volume=opt-cni-bin,target=/opt/cni/bin \\\n          --volume var-log,kind=host,source=/var/log \\\n          --mount volume=var-log,target=/var/log \\\n          --insecure-options=image\"\n        ExecStartPre=/bin/mkdir -p /opt/cni/bin\n        ExecStartPre=/bin/mkdir -p /etc/kubernetes/manifests\n        ExecStartPre=/bin/mkdir -p /etc/kubernetes/cni/net.d\n        ExecStartPre=/bin/mkdir -p /etc/kubernetes/checkpoint-secrets\n        ExecStartPre=/bin/mkdir -p /etc/kubernetes/inactive-manifests\n        ExecStartPre=/bin/mkdir -p /var/lib/cni\n        ExecStartPre=/bin/mkdir -p /var/lib/kubelet/volumeplugins\n        ExecStartPre=-/usr/bin/rkt rm --uuid-file=/var/cache/kubelet-pod.uuid\n        ExecStart=/usr/lib/coreos/kubelet-wrapper \\\n          --allow-privileged \\\n          --anonymous-auth=false \\\n          --client-ca-file=/etc/kubernetes/ca.crt \\\n          --cloud-provider= \\\n          --cluster_dns=10.3.0.10 \\\n          --cluster_domain=cluster.local \\\n          --cni-conf-dir=/etc/kubernetes/cni/net.d \\\n          --exit-on-lock-contention \\\n          --hostname-override=#COREOS_PUBLIC_IPV4# \\\n          --kubeconfig=/etc/kubernetes/kubeconfig \\\n          --lock-file=/var/run/lock/kubelet.lock \\\n          --network-plugin=cni \\\n          --node-labels=node-role.kubernetes.io/node \\\n          --pod-manifest-path=/etc/kubernetes/manifests \\\n          --volume-plugin-dir=/var/lib/kubelet/volumeplugins\n        ExecStop=-/usr/bin/rkt stop --uuid-file=/var/cache/kubelet-pod.uuid\n        Restart=always\n        RestartSec=10\n        [Install]\n        WantedBy=multi-user.target\nlocksmith:\n  reboot_strategy: #REBOOT_STRATEGY#\n"
  },
  {
    "path": "manifests/grafana/grafana-dashboards.yaml",
    "content": "apiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: grafana-dashboards\ndata:\n  all-nodes-dashboard.json: |+\n    {\n      \"dashboard\":\n    {\n        \"__inputs\": [\n            {\n                \"description\": \"\",\n                \"label\": \"prometheus\",\n                \"name\": \"DS_PROMETHEUS\",\n                \"pluginId\": \"prometheus\",\n                \"pluginName\": \"Prometheus\",\n                \"type\": \"datasource\"\n            }\n        ],\n        \"__requires\": [\n            {\n                \"id\": \"grafana\",\n                \"name\": \"Grafana\",\n                \"type\": \"grafana\",\n                \"version\": \"4.1.1\"\n            },\n            {\n                \"id\": \"graph\",\n                \"name\": \"Graph\",\n                \"type\": \"panel\",\n                \"version\": \"\"\n            },\n            {\n                \"id\": \"prometheus\",\n                \"name\": \"Prometheus\",\n                \"type\": \"datasource\",\n                \"version\": \"1.0.0\"\n            },\n            {\n                \"id\": \"singlestat\",\n                \"name\": \"Singlestat\",\n                \"type\": \"panel\",\n                \"version\": \"\"\n            }\n        ],\n        \"annotations\": {\n            \"list\": []\n        },\n        \"description\": \"Dashboard to get an overview of one server\",\n        \"editable\": true,\n        \"gnetId\": 22,\n        \"graphTooltip\": 0,\n        \"hideControls\": false,\n        \"id\": null,\n        \"links\": [],\n        \"refresh\": false,\n        \"rows\": [\n            {\n                \"collapse\": false,\n                \"height\": \"250px\",\n                \"panels\": [\n                    {\n                        \"alerting\": {},\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {},\n                        \"id\": 3,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [],\n                        \"span\": 6,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"sum(rate(node_cpu{mode=\\\"idle\\\"}[2m])) * 100\",\n                                \"hide\": false,\n                                \"intervalFactor\": 10,\n                                \"legendFormat\": \"\",\n                                \"refId\": \"A\",\n                                \"step\": 50\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Idle cpu\",\n                        \"tooltip\": {\n                            \"msResolution\": false,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"percent\",\n                                \"label\": \"cpu usage\",\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": 0,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"short\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    },\n                    {\n                        \"alerting\": {},\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {},\n                        \"id\": 9,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [],\n                        \"span\": 6,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"sum(node_load1)\",\n                                \"intervalFactor\": 4,\n                                \"legendFormat\": \"load 1m\",\n                                \"refId\": \"A\",\n                                \"step\": 20,\n                                \"target\": \"\"\n                            },\n                            {\n                                \"expr\": \"sum(node_load5)\",\n                                \"intervalFactor\": 4,\n                                \"legendFormat\": \"load 5m\",\n                                \"refId\": \"B\",\n                                \"step\": 20,\n                                \"target\": \"\"\n                            },\n                            {\n                                \"expr\": \"sum(node_load15)\",\n                                \"intervalFactor\": 4,\n                                \"legendFormat\": \"load 15m\",\n                                \"refId\": \"C\",\n                                \"step\": 20,\n                                \"target\": \"\"\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"System load\",\n                        \"tooltip\": {\n                            \"msResolution\": false,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"percentunit\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"short\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    }\n                ],\n                \"repeat\": null,\n                \"repeatIteration\": null,\n                \"repeatRowId\": null,\n                \"showTitle\": false,\n                \"title\": \"New row\",\n                \"titleSize\": \"h6\"\n            },\n            {\n                \"collapse\": false,\n                \"height\": \"250px\",\n                \"panels\": [\n                    {\n                        \"alerting\": {},\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {},\n                        \"id\": 4,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [\n                            {\n                                \"alias\": \"node_memory_SwapFree{instance=\\\"172.17.0.1:9100\\\",job=\\\"prometheus\\\"}\",\n                                \"yaxis\": 2\n                            }\n                        ],\n                        \"span\": 9,\n                        \"stack\": true,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"sum(node_memory_MemTotal) - sum(node_memory_MemFree) - sum(node_memory_Buffers) - sum(node_memory_Cached)\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"memory usage\",\n                                \"metric\": \"memo\",\n                                \"refId\": \"A\",\n                                \"step\": 4,\n                                \"target\": \"\"\n                            },\n                            {\n                                \"expr\": \"sum(node_memory_Buffers)\",\n                                \"interval\": \"\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"memory buffers\",\n                                \"metric\": \"memo\",\n                                \"refId\": \"B\",\n                                \"step\": 4,\n                                \"target\": \"\"\n                            },\n                            {\n                                \"expr\": \"sum(node_memory_Cached)\",\n                                \"interval\": \"\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"memory cached\",\n                                \"metric\": \"memo\",\n                                \"refId\": \"C\",\n                                \"step\": 4,\n                                \"target\": \"\"\n                            },\n                            {\n                                \"expr\": \"sum(node_memory_MemFree)\",\n                                \"interval\": \"\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"memory free\",\n                                \"metric\": \"memo\",\n                                \"refId\": \"D\",\n                                \"step\": 4,\n                                \"target\": \"\"\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Memory usage\",\n                        \"tooltip\": {\n                            \"msResolution\": false,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"individual\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": \"0\",\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"short\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    },\n                    {\n                        \"cacheTimeout\": null,\n                        \"colorBackground\": false,\n                        \"colorValue\": false,\n                        \"colors\": [\n                            \"rgba(50, 172, 45, 0.97)\",\n                            \"rgba(237, 129, 40, 0.89)\",\n                            \"rgba(245, 54, 54, 0.9)\"\n                        ],\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"format\": \"percent\",\n                        \"gauge\": {\n                            \"maxValue\": 100,\n                            \"minValue\": 0,\n                            \"show\": true,\n                            \"thresholdLabels\": false,\n                            \"thresholdMarkers\": true\n                        },\n                        \"id\": 5,\n                        \"interval\": null,\n                        \"links\": [],\n                        \"mappingType\": 1,\n                        \"mappingTypes\": [\n                            {\n                                \"name\": \"value to text\",\n                                \"value\": 1\n                            },\n                            {\n                                \"name\": \"range to text\",\n                                \"value\": 2\n                            }\n                        ],\n                        \"maxDataPoints\": 100,\n                        \"nullPointMode\": \"connected\",\n                        \"nullText\": null,\n                        \"postfix\": \"\",\n                        \"postfixFontSize\": \"50%\",\n                        \"prefix\": \"\",\n                        \"prefixFontSize\": \"50%\",\n                        \"rangeMaps\": [\n                            {\n                                \"from\": \"null\",\n                                \"text\": \"N/A\",\n                                \"to\": \"null\"\n                            }\n                        ],\n                        \"span\": 3,\n                        \"sparkline\": {\n                            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                            \"full\": false,\n                            \"lineColor\": \"rgb(31, 120, 193)\",\n                            \"show\": false\n                        },\n                        \"targets\": [\n                            {\n                                \"expr\": \"((sum(node_memory_MemTotal) - sum(node_memory_MemFree) - sum(node_memory_Buffers) - sum(node_memory_Cached)) / sum(node_memory_MemTotal)) * 100\",\n                                \"intervalFactor\": 2,\n                                \"metric\": \"\",\n                                \"refId\": \"A\",\n                                \"step\": 60,\n                                \"target\": \"\"\n                            }\n                        ],\n                        \"thresholds\": \"80, 90\",\n                        \"title\": \"Memory usage\",\n                        \"type\": \"singlestat\",\n                        \"valueFontSize\": \"80%\",\n                        \"valueMaps\": [\n                            {\n                                \"op\": \"=\",\n                                \"text\": \"N/A\",\n                                \"value\": \"null\"\n                            }\n                        ],\n                        \"valueName\": \"avg\"\n                    }\n                ],\n                \"repeat\": null,\n                \"repeatIteration\": null,\n                \"repeatRowId\": null,\n                \"showTitle\": false,\n                \"title\": \"New row\",\n                \"titleSize\": \"h6\"\n            },\n            {\n                \"collapse\": false,\n                \"height\": \"250px\",\n                \"panels\": [\n                    {\n                        \"alerting\": {},\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {},\n                        \"id\": 6,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [\n                            {\n                                \"alias\": \"read\",\n                                \"yaxis\": 1\n                            },\n                            {\n                                \"alias\": \"{instance=\\\"172.17.0.1:9100\\\"}\",\n                                \"yaxis\": 2\n                            },\n                            {\n                                \"alias\": \"io time\",\n                                \"yaxis\": 2\n                            }\n                        ],\n                        \"span\": 9,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"sum(rate(node_disk_bytes_read[5m]))\",\n                                \"hide\": false,\n                                \"intervalFactor\": 4,\n                                \"legendFormat\": \"read\",\n                                \"refId\": \"A\",\n                                \"step\": 8,\n                                \"target\": \"\"\n                            },\n                            {\n                                \"expr\": \"sum(rate(node_disk_bytes_written[5m]))\",\n                                \"intervalFactor\": 4,\n                                \"legendFormat\": \"written\",\n                                \"refId\": \"B\",\n                                \"step\": 8\n                            },\n                            {\n                                \"expr\": \"sum(rate(node_disk_io_time_ms[5m]))\",\n                                \"intervalFactor\": 4,\n                                \"legendFormat\": \"io time\",\n                                \"refId\": \"C\",\n                                \"step\": 8\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Disk I/O\",\n                        \"tooltip\": {\n                            \"msResolution\": false,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"ms\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    },\n                    {\n                        \"cacheTimeout\": null,\n                        \"colorBackground\": false,\n                        \"colorValue\": false,\n                        \"colors\": [\n                            \"rgba(50, 172, 45, 0.97)\",\n                            \"rgba(237, 129, 40, 0.89)\",\n                            \"rgba(245, 54, 54, 0.9)\"\n                        ],\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"format\": \"percentunit\",\n                        \"gauge\": {\n                            \"maxValue\": 1,\n                            \"minValue\": 0,\n                            \"show\": true,\n                            \"thresholdLabels\": false,\n                            \"thresholdMarkers\": true\n                        },\n                        \"id\": 7,\n                        \"interval\": null,\n                        \"links\": [],\n                        \"mappingType\": 1,\n                        \"mappingTypes\": [\n                            {\n                                \"name\": \"value to text\",\n                                \"value\": 1\n                            },\n                            {\n                                \"name\": \"range to text\",\n                                \"value\": 2\n                            }\n                        ],\n                        \"maxDataPoints\": 100,\n                        \"nullPointMode\": \"connected\",\n                        \"nullText\": null,\n                        \"postfix\": \"\",\n                        \"postfixFontSize\": \"50%\",\n                        \"prefix\": \"\",\n                        \"prefixFontSize\": \"50%\",\n                        \"rangeMaps\": [\n                            {\n                                \"from\": \"null\",\n                                \"text\": \"N/A\",\n                                \"to\": \"null\"\n                            }\n                        ],\n                        \"span\": 3,\n                        \"sparkline\": {\n                            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                            \"full\": false,\n                            \"lineColor\": \"rgb(31, 120, 193)\",\n                            \"show\": false\n                        },\n                        \"targets\": [\n                            {\n                                \"expr\": \"(sum(node_filesystem_size{device!=\\\"rootfs\\\"}) - sum(node_filesystem_free{device!=\\\"rootfs\\\"})) / sum(node_filesystem_size{device!=\\\"rootfs\\\"})\",\n                                \"intervalFactor\": 2,\n                                \"refId\": \"A\",\n                                \"step\": 60,\n                                \"target\": \"\"\n                            }\n                        ],\n                        \"thresholds\": \"0.75, 0.9\",\n                        \"title\": \"Disk space usage\",\n                        \"type\": \"singlestat\",\n                        \"valueFontSize\": \"80%\",\n                        \"valueMaps\": [\n                            {\n                                \"op\": \"=\",\n                                \"text\": \"N/A\",\n                                \"value\": \"null\"\n                            }\n                        ],\n                        \"valueName\": \"current\"\n                    }\n                ],\n                \"repeat\": null,\n                \"repeatIteration\": null,\n                \"repeatRowId\": null,\n                \"showTitle\": false,\n                \"title\": \"New row\",\n                \"titleSize\": \"h6\"\n            },\n            {\n                \"collapse\": false,\n                \"height\": \"250px\",\n                \"panels\": [\n                    {\n                        \"alerting\": {},\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {},\n                        \"id\": 8,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [\n                            {\n                                \"alias\": \"transmitted \",\n                                \"yaxis\": 2\n                            }\n                        ],\n                        \"span\": 6,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"sum(rate(node_network_receive_bytes{device!~\\\"lo\\\"}[5m]))\",\n                                \"hide\": false,\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"\",\n                                \"refId\": \"A\",\n                                \"step\": 10,\n                                \"target\": \"\"\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Network received\",\n                        \"tooltip\": {\n                            \"msResolution\": false,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    },\n                    {\n                        \"alerting\": {},\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {},\n                        \"id\": 10,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [\n                            {\n                                \"alias\": \"transmitted \",\n                                \"yaxis\": 2\n                            }\n                        ],\n                        \"span\": 6,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"sum(rate(node_network_transmit_bytes{device!~\\\"lo\\\"}[5m]))\",\n                                \"hide\": false,\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"\",\n                                \"refId\": \"B\",\n                                \"step\": 10,\n                                \"target\": \"\"\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Network transmitted\",\n                        \"tooltip\": {\n                            \"msResolution\": false,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    }\n                ],\n                \"repeat\": null,\n                \"repeatIteration\": null,\n                \"repeatRowId\": null,\n                \"showTitle\": false,\n                \"title\": \"New row\",\n                \"titleSize\": \"h6\"\n            }\n        ],\n        \"schemaVersion\": 14,\n        \"style\": \"dark\",\n        \"tags\": [\n            \"prometheus\"\n        ],\n        \"templating\": {\n            \"list\": []\n        },\n        \"time\": {\n            \"from\": \"now-1h\",\n            \"to\": \"now\"\n        },\n        \"timepicker\": {\n            \"refresh_intervals\": [\n                \"5s\",\n                \"10s\",\n                \"30s\",\n                \"1m\",\n                \"5m\",\n                \"15m\",\n                \"30m\",\n                \"1h\",\n                \"2h\",\n                \"1d\"\n            ],\n            \"time_options\": [\n                \"5m\",\n                \"15m\",\n                \"1h\",\n                \"6h\",\n                \"12h\",\n                \"24h\",\n                \"2d\",\n                \"7d\",\n                \"30d\"\n            ]\n        },\n        \"timezone\": \"browser\",\n        \"title\": \"All Nodes\",\n        \"version\": 1\n    }\n    ,\n      \"inputs\": [\n        {\n          \"name\": \"DS_PROMETHEUS\",\n          \"pluginId\": \"prometheus\",\n          \"type\": \"datasource\",\n          \"value\": \"prometheus\"\n        }\n      ],\n      \"overwrite\": true\n    }\n  deployment-dashboard.json: |+\n    {\n      \"dashboard\":\n    {\n        \"__inputs\": [\n            {\n                \"description\": \"\",\n                \"label\": \"prometheus\",\n                \"name\": \"DS_PROMETHEUS\",\n                \"pluginId\": \"prometheus\",\n                \"pluginName\": \"Prometheus\",\n                \"type\": \"datasource\"\n            }\n        ],\n        \"__requires\": [\n            {\n                \"id\": \"singlestat\",\n                \"name\": \"Singlestat\",\n                \"type\": \"panel\",\n                \"version\": \"\"\n            },\n            {\n                \"id\": \"graph\",\n                \"name\": \"Graph\",\n                \"type\": \"panel\",\n                \"version\": \"\"\n            },\n            {\n                \"id\": \"grafana\",\n                \"name\": \"Grafana\",\n                \"type\": \"grafana\",\n                \"version\": \"3.1.1\"\n            },\n            {\n                \"id\": \"prometheus\",\n                \"name\": \"Prometheus\",\n                \"type\": \"datasource\",\n                \"version\": \"1.0.0\"\n            }\n        ],\n        \"annotations\": {\n            \"list\": []\n        },\n        \"editable\": true,\n        \"gnetId\": null,\n        \"hideControls\": false,\n        \"id\": null,\n        \"links\": [],\n        \"rows\": [\n            {\n                \"collapse\": false,\n                \"editable\": true,\n                \"height\": \"200px\",\n                \"panels\": [\n                    {\n                        \"cacheTimeout\": null,\n                        \"colorBackground\": false,\n                        \"colorValue\": false,\n                        \"colors\": [\n                            \"rgba(245, 54, 54, 0.9)\",\n                            \"rgba(237, 129, 40, 0.89)\",\n                            \"rgba(50, 172, 45, 0.97)\"\n                        ],\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"format\": \"none\",\n                        \"gauge\": {\n                            \"maxValue\": 100,\n                            \"minValue\": 0,\n                            \"show\": false,\n                            \"thresholdLabels\": false,\n                            \"thresholdMarkers\": true\n                        },\n                        \"id\": 8,\n                        \"interval\": null,\n                        \"isNew\": true,\n                        \"links\": [],\n                        \"mappingType\": 1,\n                        \"mappingTypes\": [\n                            {\n                                \"name\": \"value to text\",\n                                \"value\": 1\n                            },\n                            {\n                                \"name\": \"range to text\",\n                                \"value\": 2\n                            }\n                        ],\n                        \"maxDataPoints\": 100,\n                        \"nullPointMode\": \"connected\",\n                        \"nullText\": null,\n                        \"postfix\": \"cores\",\n                        \"postfixFontSize\": \"50%\",\n                        \"prefix\": \"\",\n                        \"prefixFontSize\": \"50%\",\n                        \"rangeMaps\": [\n                            {\n                                \"from\": \"null\",\n                                \"text\": \"N/A\",\n                                \"to\": \"null\"\n                            }\n                        ],\n                        \"span\": 4,\n                        \"sparkline\": {\n                            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                            \"full\": false,\n                            \"lineColor\": \"rgb(31, 120, 193)\",\n                            \"show\": true\n                        },\n                        \"targets\": [\n                            {\n                                \"expr\": \"sum(rate(container_cpu_usage_seconds_total{namespace=\\\"$deployment_namespace\\\",pod_name=~\\\"$deployment_name.*\\\"}[3m])) \",\n                                \"intervalFactor\": 2,\n                                \"refId\": \"A\",\n                                \"step\": 600\n                            }\n                        ],\n                        \"thresholds\": \"\",\n                        \"title\": \"CPU\",\n                        \"type\": \"singlestat\",\n                        \"valueFontSize\": \"110%\",\n                        \"valueMaps\": [\n                            {\n                                \"op\": \"=\",\n                                \"text\": \"N/A\",\n                                \"value\": \"null\"\n                            }\n                        ],\n                        \"valueName\": \"avg\"\n                    },\n                    {\n                        \"cacheTimeout\": null,\n                        \"colorBackground\": false,\n                        \"colorValue\": false,\n                        \"colors\": [\n                            \"rgba(245, 54, 54, 0.9)\",\n                            \"rgba(237, 129, 40, 0.89)\",\n                            \"rgba(50, 172, 45, 0.97)\"\n                        ],\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"format\": \"none\",\n                        \"gauge\": {\n                            \"maxValue\": 100,\n                            \"minValue\": 0,\n                            \"show\": false,\n                            \"thresholdLabels\": false,\n                            \"thresholdMarkers\": true\n                        },\n                        \"id\": 9,\n                        \"interval\": null,\n                        \"isNew\": true,\n                        \"links\": [],\n                        \"mappingType\": 1,\n                        \"mappingTypes\": [\n                            {\n                                \"name\": \"value to text\",\n                                \"value\": 1\n                            },\n                            {\n                                \"name\": \"range to text\",\n                                \"value\": 2\n                            }\n                        ],\n                        \"maxDataPoints\": 100,\n                        \"nullPointMode\": \"connected\",\n                        \"nullText\": null,\n                        \"postfix\": \"GB\",\n                        \"postfixFontSize\": \"50%\",\n                        \"prefix\": \"\",\n                        \"prefixFontSize\": \"80%\",\n                        \"rangeMaps\": [\n                            {\n                                \"from\": \"null\",\n                                \"text\": \"N/A\",\n                                \"to\": \"null\"\n                            }\n                        ],\n                        \"span\": 4,\n                        \"sparkline\": {\n                            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                            \"full\": false,\n                            \"lineColor\": \"rgb(31, 120, 193)\",\n                            \"show\": true\n                        },\n                        \"targets\": [\n                            {\n                                \"expr\": \"sum(container_memory_usage_bytes{namespace=\\\"$deployment_namespace\\\",pod_name=~\\\"$deployment_name.*\\\"}) / 1024^3\",\n                                \"intervalFactor\": 2,\n                                \"refId\": \"A\",\n                                \"step\": 600\n                            }\n                        ],\n                        \"thresholds\": \"\",\n                        \"title\": \"Memory\",\n                        \"type\": \"singlestat\",\n                        \"valueFontSize\": \"110%\",\n                        \"valueMaps\": [\n                            {\n                                \"op\": \"=\",\n                                \"text\": \"N/A\",\n                                \"value\": \"null\"\n                            }\n                        ],\n                        \"valueName\": \"avg\"\n                    },\n                    {\n                        \"cacheTimeout\": null,\n                        \"colorBackground\": false,\n                        \"colorValue\": false,\n                        \"colors\": [\n                            \"rgba(245, 54, 54, 0.9)\",\n                            \"rgba(237, 129, 40, 0.89)\",\n                            \"rgba(50, 172, 45, 0.97)\"\n                        ],\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"format\": \"Bps\",\n                        \"gauge\": {\n                            \"maxValue\": 100,\n                            \"minValue\": 0,\n                            \"show\": false,\n                            \"thresholdLabels\": false,\n                            \"thresholdMarkers\": false\n                        },\n                        \"id\": 7,\n                        \"interval\": null,\n                        \"isNew\": true,\n                        \"links\": [],\n                        \"mappingType\": 1,\n                        \"mappingTypes\": [\n                            {\n                                \"name\": \"value to text\",\n                                \"value\": 1\n                            },\n                            {\n                                \"name\": \"range to text\",\n                                \"value\": 2\n                            }\n                        ],\n                        \"maxDataPoints\": 100,\n                        \"nullPointMode\": \"connected\",\n                        \"nullText\": null,\n                        \"postfix\": \"\",\n                        \"postfixFontSize\": \"50%\",\n                        \"prefix\": \"\",\n                        \"prefixFontSize\": \"50%\",\n                        \"rangeMaps\": [\n                            {\n                                \"from\": \"null\",\n                                \"text\": \"N/A\",\n                                \"to\": \"null\"\n                            }\n                        ],\n                        \"span\": 4,\n                        \"sparkline\": {\n                            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                            \"full\": false,\n                            \"lineColor\": \"rgb(31, 120, 193)\",\n                            \"show\": true\n                        },\n                        \"targets\": [\n                            {\n                                \"expr\": \"sum(rate(container_network_transmit_bytes_total{namespace=\\\"$deployment_namespace\\\",pod_name=~\\\"$deployment_name.*\\\"}[3m])) + sum(rate(container_network_receive_bytes_total{namespace=\\\"$deployment_namespace\\\",pod_name=~\\\"$deployment_name.*\\\"}[3m])) \",\n                                \"intervalFactor\": 2,\n                                \"refId\": \"A\",\n                                \"step\": 600\n                            }\n                        ],\n                        \"thresholds\": \"\",\n                        \"title\": \"Network\",\n                        \"type\": \"singlestat\",\n                        \"valueFontSize\": \"80%\",\n                        \"valueMaps\": [\n                            {\n                                \"op\": \"=\",\n                                \"text\": \"N/A\",\n                                \"value\": \"null\"\n                            }\n                        ],\n                        \"valueName\": \"avg\"\n                    }\n                ],\n                \"showTitle\": false,\n                \"title\": \"Row\"\n            },\n            {\n                \"collapse\": false,\n                \"editable\": true,\n                \"height\": \"100px\",\n                \"panels\": [\n                    {\n                        \"cacheTimeout\": null,\n                        \"colorBackground\": false,\n                        \"colorValue\": false,\n                        \"colors\": [\n                            \"rgba(245, 54, 54, 0.9)\",\n                            \"rgba(237, 129, 40, 0.89)\",\n                            \"rgba(50, 172, 45, 0.97)\"\n                        ],\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"decimals\": null,\n                        \"editable\": true,\n                        \"error\": false,\n                        \"format\": \"none\",\n                        \"gauge\": {\n                            \"maxValue\": 100,\n                            \"minValue\": 0,\n                            \"show\": false,\n                            \"thresholdLabels\": false,\n                            \"thresholdMarkers\": false\n                        },\n                        \"id\": 5,\n                        \"interval\": null,\n                        \"isNew\": true,\n                        \"links\": [],\n                        \"mappingType\": 1,\n                        \"mappingTypes\": [\n                            {\n                                \"name\": \"value to text\",\n                                \"value\": 1\n                            },\n                            {\n                                \"name\": \"range to text\",\n                                \"value\": 2\n                            }\n                        ],\n                        \"maxDataPoints\": 100,\n                        \"nullPointMode\": \"connected\",\n                        \"nullText\": null,\n                        \"postfix\": \"\",\n                        \"postfixFontSize\": \"50%\",\n                        \"prefix\": \"\",\n                        \"prefixFontSize\": \"50%\",\n                        \"rangeMaps\": [\n                            {\n                                \"from\": \"null\",\n                                \"text\": \"N/A\",\n                                \"to\": \"null\"\n                            }\n                        ],\n                        \"span\": 3,\n                        \"sparkline\": {\n                            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                            \"full\": false,\n                            \"lineColor\": \"rgb(31, 120, 193)\",\n                            \"show\": false\n                        },\n                        \"targets\": [\n                            {\n                                \"expr\": \"max(kube_deployment_spec_replicas{deployment=\\\"$deployment_name\\\",namespace=\\\"$deployment_namespace\\\"}) without (instance, pod)\",\n                                \"intervalFactor\": 2,\n                                \"metric\": \"kube_deployment_spec_replicas\",\n                                \"refId\": \"A\",\n                                \"step\": 600\n                            }\n                        ],\n                        \"thresholds\": \"\",\n                        \"title\": \"Desired Replicas\",\n                        \"type\": \"singlestat\",\n                        \"valueFontSize\": \"80%\",\n                        \"valueMaps\": [\n                            {\n                                \"op\": \"=\",\n                                \"text\": \"N/A\",\n                                \"value\": \"null\"\n                            }\n                        ],\n                        \"valueName\": \"avg\"\n                    },\n                    {\n                        \"cacheTimeout\": null,\n                        \"colorBackground\": false,\n                        \"colorValue\": false,\n                        \"colors\": [\n                            \"rgba(245, 54, 54, 0.9)\",\n                            \"rgba(237, 129, 40, 0.89)\",\n                            \"rgba(50, 172, 45, 0.97)\"\n                        ],\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"format\": \"none\",\n                        \"gauge\": {\n                            \"maxValue\": 100,\n                            \"minValue\": 0,\n                            \"show\": false,\n                            \"thresholdLabels\": false,\n                            \"thresholdMarkers\": true\n                        },\n                        \"id\": 6,\n                        \"interval\": null,\n                        \"isNew\": true,\n                        \"links\": [],\n                        \"mappingType\": 1,\n                        \"mappingTypes\": [\n                            {\n                                \"name\": \"value to text\",\n                                \"value\": 1\n                            },\n                            {\n                                \"name\": \"range to text\",\n                                \"value\": 2\n                            }\n                        ],\n                        \"maxDataPoints\": 100,\n                        \"nullPointMode\": \"connected\",\n                        \"nullText\": null,\n                        \"postfix\": \"\",\n                        \"postfixFontSize\": \"50%\",\n                        \"prefix\": \"\",\n                        \"prefixFontSize\": \"50%\",\n                        \"rangeMaps\": [\n                            {\n                                \"from\": \"null\",\n                                \"text\": \"N/A\",\n                                \"to\": \"null\"\n                            }\n                        ],\n                        \"span\": 3,\n                        \"sparkline\": {\n                            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                            \"full\": false,\n                            \"lineColor\": \"rgb(31, 120, 193)\",\n                            \"show\": false\n                        },\n                        \"targets\": [\n                            {\n                                \"expr\": \"min(kube_deployment_status_replicas_available{deployment=\\\"$deployment_name\\\",namespace=\\\"$deployment_namespace\\\"}) without (instance, pod)\",\n                                \"intervalFactor\": 2,\n                                \"refId\": \"A\",\n                                \"step\": 600\n                            }\n                        ],\n                        \"thresholds\": \"\",\n                        \"title\": \"Available Replicas\",\n                        \"type\": \"singlestat\",\n                        \"valueFontSize\": \"80%\",\n                        \"valueMaps\": [\n                            {\n                                \"op\": \"=\",\n                                \"text\": \"N/A\",\n                                \"value\": \"null\"\n                            }\n                        ],\n                        \"valueName\": \"avg\"\n                    },\n                    {\n                        \"cacheTimeout\": null,\n                        \"colorBackground\": false,\n                        \"colorValue\": false,\n                        \"colors\": [\n                            \"rgba(245, 54, 54, 0.9)\",\n                            \"rgba(237, 129, 40, 0.89)\",\n                            \"rgba(50, 172, 45, 0.97)\"\n                        ],\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"format\": \"none\",\n                        \"gauge\": {\n                            \"maxValue\": 100,\n                            \"minValue\": 0,\n                            \"show\": false,\n                            \"thresholdLabels\": false,\n                            \"thresholdMarkers\": true\n                        },\n                        \"id\": 3,\n                        \"interval\": null,\n                        \"isNew\": true,\n                        \"links\": [],\n                        \"mappingType\": 1,\n                        \"mappingTypes\": [\n                            {\n                                \"name\": \"value to text\",\n                                \"value\": 1\n                            },\n                            {\n                                \"name\": \"range to text\",\n                                \"value\": 2\n                            }\n                        ],\n                        \"maxDataPoints\": 100,\n                        \"nullPointMode\": \"connected\",\n                        \"nullText\": null,\n                        \"postfix\": \"\",\n                        \"postfixFontSize\": \"50%\",\n                        \"prefix\": \"\",\n                        \"prefixFontSize\": \"50%\",\n                        \"rangeMaps\": [\n                            {\n                                \"from\": \"null\",\n                                \"text\": \"N/A\",\n                                \"to\": \"null\"\n                            }\n                        ],\n                        \"span\": 3,\n                        \"sparkline\": {\n                            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                            \"full\": false,\n                            \"lineColor\": \"rgb(31, 120, 193)\",\n                            \"show\": false\n                        },\n                        \"targets\": [\n                            {\n                                \"expr\": \"max(kube_deployment_status_observed_generation{deployment=\\\"$deployment_name\\\",namespace=\\\"$deployment_namespace\\\"}) without (instance, pod)\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"\",\n                                \"refId\": \"A\",\n                                \"step\": 600\n                            }\n                        ],\n                        \"thresholds\": \"\",\n                        \"title\": \"Observed Generation\",\n                        \"type\": \"singlestat\",\n                        \"valueFontSize\": \"80%\",\n                        \"valueMaps\": [\n                            {\n                                \"op\": \"=\",\n                                \"text\": \"N/A\",\n                                \"value\": \"null\"\n                            }\n                        ],\n                        \"valueName\": \"avg\"\n                    },\n                    {\n                        \"cacheTimeout\": null,\n                        \"colorBackground\": false,\n                        \"colorValue\": false,\n                        \"colors\": [\n                            \"rgba(245, 54, 54, 0.9)\",\n                            \"rgba(237, 129, 40, 0.89)\",\n                            \"rgba(50, 172, 45, 0.97)\"\n                        ],\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"format\": \"none\",\n                        \"gauge\": {\n                            \"maxValue\": 100,\n                            \"minValue\": 0,\n                            \"show\": false,\n                            \"thresholdLabels\": false,\n                            \"thresholdMarkers\": true\n                        },\n                        \"id\": 2,\n                        \"interval\": null,\n                        \"isNew\": true,\n                        \"links\": [],\n                        \"mappingType\": 1,\n                        \"mappingTypes\": [\n                            {\n                                \"name\": \"value to text\",\n                                \"value\": 1\n                            },\n                            {\n                                \"name\": \"range to text\",\n                                \"value\": 2\n                            }\n                        ],\n                        \"maxDataPoints\": 100,\n                        \"nullPointMode\": \"connected\",\n                        \"nullText\": null,\n                        \"postfix\": \"\",\n                        \"postfixFontSize\": \"50%\",\n                        \"prefix\": \"\",\n                        \"prefixFontSize\": \"50%\",\n                        \"rangeMaps\": [\n                            {\n                                \"from\": \"null\",\n                                \"text\": \"N/A\",\n                                \"to\": \"null\"\n                            }\n                        ],\n                        \"span\": 3,\n                        \"sparkline\": {\n                            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                            \"full\": false,\n                            \"lineColor\": \"rgb(31, 120, 193)\",\n                            \"show\": false\n                        },\n                        \"targets\": [\n                            {\n                                \"expr\": \"max(kube_deployment_metadata_generation{deployment=\\\"$deployment_name\\\",namespace=\\\"$deployment_namespace\\\"}) without (instance, pod)\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"\",\n                                \"refId\": \"A\",\n                                \"step\": 600\n                            }\n                        ],\n                        \"thresholds\": \"\",\n                        \"title\": \"Metadata Generation\",\n                        \"type\": \"singlestat\",\n                        \"valueFontSize\": \"80%\",\n                        \"valueMaps\": [\n                            {\n                                \"op\": \"=\",\n                                \"text\": \"N/A\",\n                                \"value\": \"null\"\n                            }\n                        ],\n                        \"valueName\": \"avg\"\n                    }\n                ],\n                \"title\": \"New row\"\n            },\n            {\n                \"collapse\": false,\n                \"editable\": true,\n                \"height\": \"350px\",\n                \"panels\": [\n                    {\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {\n                            \"threshold1\": null,\n                            \"threshold1Color\": \"rgba(216, 200, 27, 0.27)\",\n                            \"threshold2\": null,\n                            \"threshold2Color\": \"rgba(234, 112, 112, 0.22)\"\n                        },\n                        \"id\": 1,\n                        \"isNew\": true,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"hideZero\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [],\n                        \"span\": 12,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"max(kube_deployment_status_replicas{deployment=\\\"$deployment_name\\\",namespace=\\\"$deployment_namespace\\\"}) without (instance, pod)\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"current replicas\",\n                                \"refId\": \"A\",\n                                \"step\": 30\n                            },\n                            {\n                                \"expr\": \"min(kube_deployment_status_replicas_available{deployment=\\\"$deployment_name\\\",namespace=\\\"$deployment_namespace\\\"}) without (instance, pod)\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"available\",\n                                \"refId\": \"B\",\n                                \"step\": 30\n                            },\n                            {\n                                \"expr\": \"max(kube_deployment_status_replicas_unavailable{deployment=\\\"$deployment_name\\\",namespace=\\\"$deployment_namespace\\\"}) without (instance, pod)\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"unavailable\",\n                                \"refId\": \"C\",\n                                \"step\": 30\n                            },\n                            {\n                                \"expr\": \"min(kube_deployment_status_replicas_updated{deployment=\\\"$deployment_name\\\",namespace=\\\"$deployment_namespace\\\"}) without (instance, pod)\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"updated\",\n                                \"refId\": \"D\",\n                                \"step\": 30\n                            },\n                            {\n                                \"expr\": \"max(kube_deployment_spec_replicas{deployment=\\\"$deployment_name\\\",namespace=\\\"$deployment_namespace\\\"}) without (instance, pod)\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"desired\",\n                                \"refId\": \"E\",\n                                \"step\": 30\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Replicas\",\n                        \"tooltip\": {\n                            \"msResolution\": true,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"transparent\": false,\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"none\",\n                                \"label\": \"\",\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"short\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": false\n                            }\n                        ]\n                    }\n                ],\n                \"showTitle\": false,\n                \"title\": \"New row\"\n            }\n        ],\n        \"schemaVersion\": 12,\n        \"sharedCrosshair\": true,\n        \"style\": \"dark\",\n        \"tags\": [],\n        \"templating\": {\n            \"list\": [\n                {\n                    \"allValue\": \".*\",\n                    \"current\": {},\n                    \"datasource\": \"${DS_PROMETHEUS}\",\n                    \"hide\": 0,\n                    \"includeAll\": false,\n                    \"label\": \"Namespace\",\n                    \"multi\": false,\n                    \"name\": \"deployment_namespace\",\n                    \"options\": [],\n                    \"query\": \"label_values(kube_deployment_metadata_generation, namespace)\",\n                    \"refresh\": 1,\n                    \"regex\": \"\",\n                    \"sort\": 0,\n                    \"tagValuesQuery\": null,\n                    \"tagsQuery\": \"\",\n                    \"type\": \"query\",\n                    \"useTags\": false\n                },\n                {\n                    \"allValue\": null,\n                    \"current\": {},\n                    \"datasource\": \"${DS_PROMETHEUS}\",\n                    \"hide\": 0,\n                    \"includeAll\": false,\n                    \"label\": \"Deployment\",\n                    \"multi\": false,\n                    \"name\": \"deployment_name\",\n                    \"options\": [],\n                    \"query\": \"label_values(kube_deployment_metadata_generation{namespace=\\\"$deployment_namespace\\\"}, deployment)\",\n                    \"refresh\": 1,\n                    \"regex\": \"\",\n                    \"sort\": 0,\n                    \"tagValuesQuery\": \"\",\n                    \"tagsQuery\": \"deployment\",\n                    \"type\": \"query\",\n                    \"useTags\": false\n                }\n            ]\n        },\n        \"time\": {\n            \"from\": \"now-6h\",\n            \"to\": \"now\"\n        },\n        \"timepicker\": {\n            \"refresh_intervals\": [\n                \"5s\",\n                \"10s\",\n                \"30s\",\n                \"1m\",\n                \"5m\",\n                \"15m\",\n                \"30m\",\n                \"1h\",\n                \"2h\",\n                \"1d\"\n            ],\n            \"time_options\": [\n                \"5m\",\n                \"15m\",\n                \"1h\",\n                \"6h\",\n                \"12h\",\n                \"24h\",\n                \"2d\",\n                \"7d\",\n                \"30d\"\n            ]\n        },\n        \"timezone\": \"browser\",\n        \"title\": \"Deployment\",\n        \"version\": 2\n    }\n    ,\n      \"inputs\": [\n        {\n          \"name\": \"DS_PROMETHEUS\",\n          \"pluginId\": \"prometheus\",\n          \"type\": \"datasource\",\n          \"value\": \"prometheus\"\n        }\n      ],\n      \"overwrite\": true\n    }\n  kubernetes-pods-dashboard.json: |+\n    {\n      \"dashboard\":\n    {\n        \"__inputs\": [\n            {\n                \"description\": \"\",\n                \"label\": \"prometheus\",\n                \"name\": \"DS_PROMETHEUS\",\n                \"pluginId\": \"prometheus\",\n                \"pluginName\": \"Prometheus\",\n                \"type\": \"datasource\"\n            }\n        ],\n        \"__requires\": [\n            {\n                \"id\": \"graph\",\n                \"name\": \"Graph\",\n                \"type\": \"panel\",\n                \"version\": \"\"\n            },\n            {\n                \"id\": \"grafana\",\n                \"name\": \"Grafana\",\n                \"type\": \"grafana\",\n                \"version\": \"3.1.1\"\n            },\n            {\n                \"id\": \"prometheus\",\n                \"name\": \"Prometheus\",\n                \"type\": \"datasource\",\n                \"version\": \"1.0.0\"\n            }\n        ],\n        \"annotations\": {\n            \"list\": []\n        },\n        \"editable\": true,\n        \"gnetId\": null,\n        \"hideControls\": false,\n        \"id\": null,\n        \"links\": [],\n        \"rows\": [\n            {\n                \"collapse\": false,\n                \"editable\": true,\n                \"height\": \"250px\",\n                \"panels\": [\n                    {\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {\n                            \"threshold1\": null,\n                            \"threshold1Color\": \"rgba(216, 200, 27, 0.27)\",\n                            \"threshold2\": null,\n                            \"threshold2Color\": \"rgba(234, 112, 112, 0.22)\"\n                        },\n                        \"id\": 1,\n                        \"isNew\": true,\n                        \"legend\": {\n                            \"alignAsTable\": true,\n                            \"avg\": true,\n                            \"current\": true,\n                            \"max\": false,\n                            \"min\": false,\n                            \"rightSide\": true,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": true\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [],\n                        \"span\": 12,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"sum by(container_name) (container_memory_usage_bytes{pod_name=\\\"$pod\\\", container_name=~\\\"$container\\\", container_name!=\\\"POD\\\"})\",\n                                \"interval\": \"10s\",\n                                \"intervalFactor\": 1,\n                                \"legendFormat\": \"Current: {{ container_name }}\",\n                                \"metric\": \"container_memory_usage_bytes\",\n                                \"refId\": \"A\",\n                                \"step\": 10\n                            },\n                            {\n                                \"expr\": \"kube_pod_container_resource_requests_memory_bytes{pod=\\\"$pod\\\", container=~\\\"$container\\\"}\",\n                                \"interval\": \"10s\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"Requested: {{ container }}\",\n                                \"metric\": \"kube_pod_container_resource_requests_memory_bytes\",\n                                \"refId\": \"B\",\n                                \"step\": 20\n                            }\n                        ],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Memory Usage\",\n                        \"tooltip\": {\n                            \"msResolution\": true,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"show\": true\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"short\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    }\n                ],\n                \"title\": \"Row\"\n            },\n            {\n                \"collapse\": false,\n                \"editable\": true,\n                \"height\": \"250px\",\n                \"panels\": [\n                    {\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {\n                            \"threshold1\": null,\n                            \"threshold1Color\": \"rgba(216, 200, 27, 0.27)\",\n                            \"threshold2\": null,\n                            \"threshold2Color\": \"rgba(234, 112, 112, 0.22)\"\n                        },\n                        \"id\": 2,\n                        \"isNew\": true,\n                        \"legend\": {\n                            \"alignAsTable\": true,\n                            \"avg\": true,\n                            \"current\": true,\n                            \"max\": false,\n                            \"min\": false,\n                            \"rightSide\": true,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": true\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [],\n                        \"span\": 12,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"sum by (container_name)( rate(container_cpu_usage_seconds_total{image!=\\\"\\\",container_name!=\\\"POD\\\",pod_name=\\\"$pod\\\"}[1m] ) )\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"{{ container_name }}\",\n                                \"refId\": \"A\",\n                                \"step\": 30\n                            }\n                        ],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"CPU Usage\",\n                        \"tooltip\": {\n                            \"msResolution\": true,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"show\": true\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"short\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"short\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    }\n                ],\n                \"title\": \"New row\"\n            },\n            {\n                \"collapse\": false,\n                \"editable\": true,\n                \"height\": \"250px\",\n                \"panels\": [\n                    {\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {\n                            \"threshold1\": null,\n                            \"threshold1Color\": \"rgba(216, 200, 27, 0.27)\",\n                            \"threshold2\": null,\n                            \"threshold2Color\": \"rgba(234, 112, 112, 0.22)\"\n                        },\n                        \"id\": 3,\n                        \"isNew\": true,\n                        \"legend\": {\n                            \"alignAsTable\": true,\n                            \"avg\": true,\n                            \"current\": true,\n                            \"max\": false,\n                            \"min\": false,\n                            \"rightSide\": true,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": true\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [],\n                        \"span\": 12,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"sort_desc(sum by (pod_name) (rate (container_network_receive_bytes_total{pod_name=\\\"$pod\\\"}[1m]) ))\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"{{ pod_name }}\",\n                                \"refId\": \"A\",\n                                \"step\": 30\n                            }\n                        ],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Network I/O\",\n                        \"tooltip\": {\n                            \"msResolution\": true,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"show\": true\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"short\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    }\n                ],\n                \"title\": \"New row\"\n            }\n        ],\n        \"schemaVersion\": 12,\n        \"sharedCrosshair\": true,\n        \"style\": \"dark\",\n        \"tags\": [],\n        \"templating\": {\n            \"list\": [\n                {\n                    \"allValue\": \".*\",\n                    \"current\": {},\n                    \"datasource\": \"${DS_PROMETHEUS}\",\n                    \"hide\": 0,\n                    \"includeAll\": true,\n                    \"label\": \"Namespace\",\n                    \"multi\": false,\n                    \"name\": \"namespace\",\n                    \"options\": [],\n                    \"query\": \"label_values(kube_pod_info, namespace)\",\n                    \"refresh\": 1,\n                    \"regex\": \"\",\n                    \"type\": \"query\"\n                },\n                {\n                    \"current\": {},\n                    \"datasource\": \"${DS_PROMETHEUS}\",\n                    \"hide\": 0,\n                    \"includeAll\": false,\n                    \"label\": \"Pod\",\n                    \"multi\": false,\n                    \"name\": \"pod\",\n                    \"options\": [],\n                    \"query\": \"label_values(kube_pod_info{namespace=~\\\"$namespace\\\"}, pod)\",\n                    \"refresh\": 1,\n                    \"regex\": \"\",\n                    \"type\": \"query\"\n                },\n                {\n                    \"allValue\": \".*\",\n                    \"current\": {},\n                    \"datasource\": \"${DS_PROMETHEUS}\",\n                    \"hide\": 0,\n                    \"includeAll\": true,\n                    \"label\": \"Container\",\n                    \"multi\": false,\n                    \"name\": \"container\",\n                    \"options\": [],\n                    \"query\": \"label_values(kube_pod_container_info{namespace=\\\"$namespace\\\", pod=\\\"$pod\\\"}, container)\",\n                    \"refresh\": 1,\n                    \"regex\": \"\",\n                    \"type\": \"query\"\n                }\n            ]\n        },\n        \"time\": {\n            \"from\": \"now-6h\",\n            \"to\": \"now\"\n        },\n        \"timepicker\": {\n            \"refresh_intervals\": [\n                \"5s\",\n                \"10s\",\n                \"30s\",\n                \"1m\",\n                \"5m\",\n                \"15m\",\n                \"30m\",\n                \"1h\",\n                \"2h\",\n                \"1d\"\n            ],\n            \"time_options\": [\n                \"5m\",\n                \"15m\",\n                \"1h\",\n                \"6h\",\n                \"12h\",\n                \"24h\",\n                \"2d\",\n                \"7d\",\n                \"30d\"\n            ]\n        },\n        \"timezone\": \"browser\",\n        \"title\": \"Pods\",\n        \"version\": 26\n    }\n    ,\n      \"inputs\": [\n        {\n          \"name\": \"DS_PROMETHEUS\",\n          \"pluginId\": \"prometheus\",\n          \"type\": \"datasource\",\n          \"value\": \"prometheus\"\n        }\n      ],\n      \"overwrite\": true\n    }\n  node-dashboard.json: |+\n    {\n      \"dashboard\":\n    {\n        \"__inputs\": [\n            {\n                \"description\": \"\",\n                \"label\": \"prometheus\",\n                \"name\": \"DS_PROMETHEUS\",\n                \"pluginId\": \"prometheus\",\n                \"pluginName\": \"Prometheus\",\n                \"type\": \"datasource\"\n            }\n        ],\n        \"__requires\": [\n            {\n                \"id\": \"grafana\",\n                \"name\": \"Grafana\",\n                \"type\": \"grafana\",\n                \"version\": \"4.1.1\"\n            },\n            {\n                \"id\": \"graph\",\n                \"name\": \"Graph\",\n                \"type\": \"panel\",\n                \"version\": \"\"\n            },\n            {\n                \"id\": \"prometheus\",\n                \"name\": \"Prometheus\",\n                \"type\": \"datasource\",\n                \"version\": \"1.0.0\"\n            },\n            {\n                \"id\": \"singlestat\",\n                \"name\": \"Singlestat\",\n                \"type\": \"panel\",\n                \"version\": \"\"\n            }\n        ],\n        \"annotations\": {\n            \"list\": []\n        },\n        \"description\": \"Dashboard to get an overview of one server\",\n        \"editable\": true,\n        \"gnetId\": 22,\n        \"graphTooltip\": 0,\n        \"hideControls\": false,\n        \"id\": null,\n        \"links\": [],\n        \"refresh\": false,\n        \"rows\": [\n            {\n                \"collapse\": false,\n                \"height\": \"250px\",\n                \"panels\": [\n                    {\n                        \"alerting\": {},\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {},\n                        \"id\": 3,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [],\n                        \"span\": 6,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"100 - (avg by (cpu) (irate(node_cpu{mode=\\\"idle\\\", instance=\\\"$server\\\"}[5m])) * 100)\",\n                                \"hide\": false,\n                                \"intervalFactor\": 10,\n                                \"legendFormat\": \"{{cpu}}\",\n                                \"refId\": \"A\",\n                                \"step\": 50\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Idle cpu\",\n                        \"tooltip\": {\n                            \"msResolution\": false,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"percent\",\n                                \"label\": \"cpu usage\",\n                                \"logBase\": 1,\n                                \"max\": 100,\n                                \"min\": 0,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"short\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    },\n                    {\n                        \"alerting\": {},\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {},\n                        \"id\": 9,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [],\n                        \"span\": 6,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"node_load1{instance=\\\"$server\\\"}\",\n                                \"intervalFactor\": 4,\n                                \"legendFormat\": \"load 1m\",\n                                \"refId\": \"A\",\n                                \"step\": 20,\n                                \"target\": \"\"\n                            },\n                            {\n                                \"expr\": \"node_load5{instance=\\\"$server\\\"}\",\n                                \"intervalFactor\": 4,\n                                \"legendFormat\": \"load 5m\",\n                                \"refId\": \"B\",\n                                \"step\": 20,\n                                \"target\": \"\"\n                            },\n                            {\n                                \"expr\": \"node_load15{instance=\\\"$server\\\"}\",\n                                \"intervalFactor\": 4,\n                                \"legendFormat\": \"load 15m\",\n                                \"refId\": \"C\",\n                                \"step\": 20,\n                                \"target\": \"\"\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"System load\",\n                        \"tooltip\": {\n                            \"msResolution\": false,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"percentunit\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"short\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    }\n                ],\n                \"repeat\": null,\n                \"repeatIteration\": null,\n                \"repeatRowId\": null,\n                \"showTitle\": false,\n                \"title\": \"New row\",\n                \"titleSize\": \"h6\"\n            },\n            {\n                \"collapse\": false,\n                \"height\": \"250px\",\n                \"panels\": [\n                    {\n                        \"alerting\": {},\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {},\n                        \"id\": 4,\n                        \"legend\": {\n                            \"alignAsTable\": false,\n                            \"avg\": false,\n                            \"current\": false,\n                            \"hideEmpty\": false,\n                            \"hideZero\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"rightSide\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [\n                            {\n                                \"alias\": \"node_memory_SwapFree{instance=\\\"172.17.0.1:9100\\\",job=\\\"prometheus\\\"}\",\n                                \"yaxis\": 2\n                            }\n                        ],\n                        \"span\": 9,\n                        \"stack\": true,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"node_memory_MemTotal{instance=\\\"$server\\\"} - node_memory_MemFree{instance=\\\"$server\\\"} - node_memory_Buffers{instance=\\\"$server\\\"} - node_memory_Cached{instance=\\\"$server\\\"}\",\n                                \"hide\": false,\n                                \"interval\": \"\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"memory used\",\n                                \"metric\": \"\",\n                                \"refId\": \"C\",\n                                \"step\": 4\n                            },\n                            {\n                                \"expr\": \"node_memory_Buffers{instance=\\\"$server\\\"}\",\n                                \"interval\": \"\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"memory buffers\",\n                                \"metric\": \"\",\n                                \"refId\": \"E\",\n                                \"step\": 4\n                            },\n                            {\n                                \"expr\": \"node_memory_Cached{instance=\\\"$server\\\"}\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"memory cached\",\n                                \"metric\": \"\",\n                                \"refId\": \"F\",\n                                \"step\": 4\n                            },\n                            {\n                                \"expr\": \"node_memory_MemFree{instance=\\\"$server\\\"}\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"memory free\",\n                                \"metric\": \"\",\n                                \"refId\": \"D\",\n                                \"step\": 4\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Memory usage\",\n                        \"tooltip\": {\n                            \"msResolution\": false,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"individual\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": \"0\",\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"short\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    },\n                    {\n                        \"cacheTimeout\": null,\n                        \"colorBackground\": false,\n                        \"colorValue\": false,\n                        \"colors\": [\n                            \"rgba(50, 172, 45, 0.97)\",\n                            \"rgba(237, 129, 40, 0.89)\",\n                            \"rgba(245, 54, 54, 0.9)\"\n                        ],\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"format\": \"percent\",\n                        \"gauge\": {\n                            \"maxValue\": 100,\n                            \"minValue\": 0,\n                            \"show\": true,\n                            \"thresholdLabels\": false,\n                            \"thresholdMarkers\": true\n                        },\n                        \"id\": 5,\n                        \"interval\": null,\n                        \"links\": [],\n                        \"mappingType\": 1,\n                        \"mappingTypes\": [\n                            {\n                                \"name\": \"value to text\",\n                                \"value\": 1\n                            },\n                            {\n                                \"name\": \"range to text\",\n                                \"value\": 2\n                            }\n                        ],\n                        \"maxDataPoints\": 100,\n                        \"nullPointMode\": \"connected\",\n                        \"nullText\": null,\n                        \"postfix\": \"\",\n                        \"postfixFontSize\": \"50%\",\n                        \"prefix\": \"\",\n                        \"prefixFontSize\": \"50%\",\n                        \"rangeMaps\": [\n                            {\n                                \"from\": \"null\",\n                                \"text\": \"N/A\",\n                                \"to\": \"null\"\n                            }\n                        ],\n                        \"span\": 3,\n                        \"sparkline\": {\n                            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                            \"full\": false,\n                            \"lineColor\": \"rgb(31, 120, 193)\",\n                            \"show\": false\n                        },\n                        \"targets\": [\n                            {\n                                \"expr\": \"((node_memory_MemTotal{instance=\\\"$server\\\"} - node_memory_MemFree{instance=\\\"$server\\\"}  - node_memory_Buffers{instance=\\\"$server\\\"} - node_memory_Cached{instance=\\\"$server\\\"}) / node_memory_MemTotal{instance=\\\"$server\\\"}) * 100\",\n                                \"intervalFactor\": 2,\n                                \"refId\": \"A\",\n                                \"step\": 60,\n                                \"target\": \"\"\n                            }\n                        ],\n                        \"thresholds\": \"80, 90\",\n                        \"title\": \"Memory usage\",\n                        \"type\": \"singlestat\",\n                        \"valueFontSize\": \"80%\",\n                        \"valueMaps\": [\n                            {\n                                \"op\": \"=\",\n                                \"text\": \"N/A\",\n                                \"value\": \"null\"\n                            }\n                        ],\n                        \"valueName\": \"avg\"\n                    }\n                ],\n                \"repeat\": null,\n                \"repeatIteration\": null,\n                \"repeatRowId\": null,\n                \"showTitle\": false,\n                \"title\": \"New row\",\n                \"titleSize\": \"h6\"\n            },\n            {\n                \"collapse\": false,\n                \"height\": \"250px\",\n                \"panels\": [\n                    {\n                        \"alerting\": {},\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {},\n                        \"id\": 6,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [\n                            {\n                                \"alias\": \"read\",\n                                \"yaxis\": 1\n                            },\n                            {\n                                \"alias\": \"{instance=\\\"172.17.0.1:9100\\\"}\",\n                                \"yaxis\": 2\n                            },\n                            {\n                                \"alias\": \"io time\",\n                                \"yaxis\": 2\n                            }\n                        ],\n                        \"span\": 9,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"sum by (instance) (rate(node_disk_bytes_read{instance=\\\"$server\\\"}[2m]))\",\n                                \"hide\": false,\n                                \"intervalFactor\": 4,\n                                \"legendFormat\": \"read\",\n                                \"refId\": \"A\",\n                                \"step\": 8,\n                                \"target\": \"\"\n                            },\n                            {\n                                \"expr\": \"sum by (instance) (rate(node_disk_bytes_written{instance=\\\"$server\\\"}[2m]))\",\n                                \"intervalFactor\": 4,\n                                \"legendFormat\": \"written\",\n                                \"refId\": \"B\",\n                                \"step\": 8\n                            },\n                            {\n                                \"expr\": \"sum by (instance) (rate(node_disk_io_time_ms{instance=\\\"$server\\\"}[2m]))\",\n                                \"intervalFactor\": 4,\n                                \"legendFormat\": \"io time\",\n                                \"refId\": \"C\",\n                                \"step\": 8\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Disk I/O\",\n                        \"tooltip\": {\n                            \"msResolution\": false,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"ms\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    },\n                    {\n                        \"cacheTimeout\": null,\n                        \"colorBackground\": false,\n                        \"colorValue\": false,\n                        \"colors\": [\n                            \"rgba(50, 172, 45, 0.97)\",\n                            \"rgba(237, 129, 40, 0.89)\",\n                            \"rgba(245, 54, 54, 0.9)\"\n                        ],\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"format\": \"percentunit\",\n                        \"gauge\": {\n                            \"maxValue\": 1,\n                            \"minValue\": 0,\n                            \"show\": true,\n                            \"thresholdLabels\": false,\n                            \"thresholdMarkers\": true\n                        },\n                        \"id\": 7,\n                        \"interval\": null,\n                        \"links\": [],\n                        \"mappingType\": 1,\n                        \"mappingTypes\": [\n                            {\n                                \"name\": \"value to text\",\n                                \"value\": 1\n                            },\n                            {\n                                \"name\": \"range to text\",\n                                \"value\": 2\n                            }\n                        ],\n                        \"maxDataPoints\": 100,\n                        \"nullPointMode\": \"connected\",\n                        \"nullText\": null,\n                        \"postfix\": \"\",\n                        \"postfixFontSize\": \"50%\",\n                        \"prefix\": \"\",\n                        \"prefixFontSize\": \"50%\",\n                        \"rangeMaps\": [\n                            {\n                                \"from\": \"null\",\n                                \"text\": \"N/A\",\n                                \"to\": \"null\"\n                            }\n                        ],\n                        \"span\": 3,\n                        \"sparkline\": {\n                            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                            \"full\": false,\n                            \"lineColor\": \"rgb(31, 120, 193)\",\n                            \"show\": false\n                        },\n                        \"targets\": [\n                            {\n                                \"expr\": \"(sum(node_filesystem_size{device!=\\\"rootfs\\\",instance=\\\"$server\\\"}) - sum(node_filesystem_free{device!=\\\"rootfs\\\",instance=\\\"$server\\\"})) / sum(node_filesystem_size{device!=\\\"rootfs\\\",instance=\\\"$server\\\"})\",\n                                \"intervalFactor\": 2,\n                                \"refId\": \"A\",\n                                \"step\": 60,\n                                \"target\": \"\"\n                            }\n                        ],\n                        \"thresholds\": \"0.75, 0.9\",\n                        \"title\": \"Disk space usage\",\n                        \"type\": \"singlestat\",\n                        \"valueFontSize\": \"80%\",\n                        \"valueMaps\": [\n                            {\n                                \"op\": \"=\",\n                                \"text\": \"N/A\",\n                                \"value\": \"null\"\n                            }\n                        ],\n                        \"valueName\": \"current\"\n                    }\n                ],\n                \"repeat\": null,\n                \"repeatIteration\": null,\n                \"repeatRowId\": null,\n                \"showTitle\": false,\n                \"title\": \"New row\",\n                \"titleSize\": \"h6\"\n            },\n            {\n                \"collapse\": false,\n                \"height\": \"250px\",\n                \"panels\": [\n                    {\n                        \"alerting\": {},\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {},\n                        \"id\": 8,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [\n                            {\n                                \"alias\": \"transmitted \",\n                                \"yaxis\": 2\n                            }\n                        ],\n                        \"span\": 6,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"rate(node_network_receive_bytes{instance=\\\"$server\\\",device!~\\\"lo\\\"}[5m])\",\n                                \"hide\": false,\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"{{device}}\",\n                                \"refId\": \"A\",\n                                \"step\": 10,\n                                \"target\": \"\"\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Network received\",\n                        \"tooltip\": {\n                            \"msResolution\": false,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    },\n                    {\n                        \"alerting\": {},\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"editable\": true,\n                        \"error\": false,\n                        \"fill\": 1,\n                        \"grid\": {},\n                        \"id\": 10,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 2,\n                        \"links\": [],\n                        \"nullPointMode\": \"connected\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [\n                            {\n                                \"alias\": \"transmitted \",\n                                \"yaxis\": 2\n                            }\n                        ],\n                        \"span\": 6,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"rate(node_network_transmit_bytes{instance=\\\"$server\\\",device!~\\\"lo\\\"}[5m])\",\n                                \"hide\": false,\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"{{device}}\",\n                                \"refId\": \"B\",\n                                \"step\": 10,\n                                \"target\": \"\"\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Network transmitted\",\n                        \"tooltip\": {\n                            \"msResolution\": false,\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"cumulative\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    }\n                ],\n                \"repeat\": null,\n                \"repeatIteration\": null,\n                \"repeatRowId\": null,\n                \"showTitle\": false,\n                \"title\": \"New row\",\n                \"titleSize\": \"h6\"\n            }\n        ],\n        \"schemaVersion\": 14,\n        \"style\": \"dark\",\n        \"tags\": [\n            \"prometheus\"\n        ],\n        \"templating\": {\n            \"list\": [\n                {\n                    \"allValue\": null,\n                    \"current\": {},\n                    \"datasource\": \"${DS_PROMETHEUS}\",\n                    \"hide\": 0,\n                    \"includeAll\": false,\n                    \"label\": null,\n                    \"multi\": false,\n                    \"name\": \"server\",\n                    \"options\": [],\n                    \"query\": \"label_values(node_boot_time, instance)\",\n                    \"refresh\": 1,\n                    \"regex\": \"\",\n                    \"sort\": 0,\n                    \"tagValuesQuery\": \"\",\n                    \"tags\": [],\n                    \"tagsQuery\": \"\",\n                    \"type\": \"query\",\n                    \"useTags\": false\n                }\n            ]\n        },\n        \"time\": {\n            \"from\": \"now-1h\",\n            \"to\": \"now\"\n        },\n        \"timepicker\": {\n            \"refresh_intervals\": [\n                \"5s\",\n                \"10s\",\n                \"30s\",\n                \"1m\",\n                \"5m\",\n                \"15m\",\n                \"30m\",\n                \"1h\",\n                \"2h\",\n                \"1d\"\n            ],\n            \"time_options\": [\n                \"5m\",\n                \"15m\",\n                \"1h\",\n                \"6h\",\n                \"12h\",\n                \"24h\",\n                \"2d\",\n                \"7d\",\n                \"30d\"\n            ]\n        },\n        \"timezone\": \"browser\",\n        \"title\": \"Nodes\",\n        \"version\": 1\n    }\n    ,\n      \"inputs\": [\n        {\n          \"name\": \"DS_PROMETHEUS\",\n          \"pluginId\": \"prometheus\",\n          \"type\": \"datasource\",\n          \"value\": \"prometheus\"\n        }\n      ],\n      \"overwrite\": true\n    }\n  traefik-dashboard.json: |+\n    {\n      \"dashboard\": {\n        \"__inputs\": [\n          {\n            \"description\": \"\",\n            \"label\": \"prometheus\",\n            \"name\": \"DS_PROMETHEUS\",\n            \"pluginId\": \"prometheus\",\n            \"pluginName\": \"Prometheus\",\n            \"type\": \"datasource\"\n          }\n        ],\n        \"__requires\": [\n          {\n            \"id\": \"grafana\",\n            \"name\": \"Grafana\",\n            \"type\": \"grafana\",\n            \"version\": \"4.1.1\"\n          },\n          {\n            \"id\": \"graph\",\n            \"name\": \"Graph\",\n            \"type\": \"panel\",\n            \"version\": \"\"\n          },\n          {\n            \"id\": \"prometheus\",\n            \"name\": \"Prometheus\",\n            \"type\": \"datasource\",\n            \"version\": \"1.0.0\"\n          },\n          {\n            \"id\": \"singlestat\",\n            \"name\": \"Singlestat\",\n            \"type\": \"panel\",\n            \"version\": \"\"\n          }\n        ],\n        \"annotations\": {\n          \"list\": []\n        },\n        \"description\": \"Visualize Traefik Health Metrics\",\n        \"editable\": true,\n        \"gnetId\": 2240,\n        \"graphTooltip\": 0,\n        \"hideControls\": false,\n        \"id\": null,\n        \"links\": [],\n        \"refresh\": \"30s\",\n        \"rows\": [\n          {\n            \"collapse\": false,\n            \"height\": 288,\n            \"panels\": [\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": false,\n                \"colorValue\": false,\n                \"colors\": [\n                  \"rgba(245, 54, 54, 0.9)\",\n                  \"rgba(237, 129, 40, 0.89)\",\n                  \"rgba(50, 172, 45, 0.97)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"decimals\": 0,\n                \"format\": \"s\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 3,\n                \"interval\": null,\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 1,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": false,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": false\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"time() - process_start_time_seconds{job=\\\"load-balancer\\\"}\",\n                    \"intervalFactor\": 2,\n                    \"refId\": \"A\",\n                    \"step\": 1800\n                  }\n                ],\n                \"thresholds\": \"\",\n                \"title\": \"Uptime\",\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"80%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"current\"\n              },\n              {\n                \"aliasColors\": {},\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"fill\": 1,\n                \"id\": 1,\n                \"legend\": {\n                  \"avg\": false,\n                  \"current\": false,\n                  \"max\": false,\n                  \"min\": false,\n                  \"show\": true,\n                  \"total\": false,\n                  \"values\": false\n                },\n                \"lines\": true,\n                \"linewidth\": 1,\n                \"links\": [],\n                \"nullPointMode\": \"null\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [],\n                \"spaceLength\": 10,\n                \"span\": 3,\n                \"stack\": false,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"sum(traefik_requests_total{service=\\\"http\\\"})\",\n                    \"interval\": \"\",\n                    \"intervalFactor\": 2,\n                    \"legendFormat\": \"{{http}}\",\n                    \"metric\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 240\n                  },\n                  {\n                    \"expr\": \"sum(traefik_requests_total{service=\\\"https\\\"})\",\n                    \"interval\": \"\",\n                    \"intervalFactor\": 2,\n                    \"legendFormat\": \"{{https}}\",\n                    \"refId\": \"B\",\n                    \"step\": 240\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"Total requests\",\n                \"tooltip\": {\n                  \"shared\": true,\n                  \"sort\": 0,\n                  \"value_type\": \"individual\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"none\",\n                    \"label\": \"Count\",\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": false\n                  }\n                ]\n              },\n              {\n                \"aliasColors\": {},\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"fill\": 1,\n                \"id\": 2,\n                \"legend\": {\n                  \"avg\": false,\n                  \"current\": false,\n                  \"max\": false,\n                  \"min\": false,\n                  \"show\": true,\n                  \"total\": false,\n                  \"values\": false\n                },\n                \"lines\": true,\n                \"linewidth\": 1,\n                \"links\": [],\n                \"nullPointMode\": \"null\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [],\n                \"spaceLength\": 10,\n                \"span\": 3,\n                \"stack\": false,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"sum(traefik_request_duration_seconds_sum) / sum(traefik_requests_total) * 1000\",\n                    \"intervalFactor\": 2,\n                    \"legendFormat\": \"Average response time (ms)\",\n                    \"refId\": \"A\",\n                    \"step\": 240\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"Average response time\",\n                \"tooltip\": {\n                  \"shared\": true,\n                  \"sort\": 0,\n                  \"value_type\": \"individual\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"ms\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  }\n                ]\n              },\n              {\n                \"aliasColors\": {},\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"fill\": 1,\n                \"id\": 6,\n                \"legend\": {\n                  \"avg\": false,\n                  \"current\": false,\n                  \"max\": false,\n                  \"min\": false,\n                  \"show\": true,\n                  \"total\": false,\n                  \"values\": false\n                },\n                \"lines\": true,\n                \"linewidth\": 1,\n                \"links\": [],\n                \"nullPointMode\": \"null\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [],\n                \"spaceLength\": 10,\n                \"span\": 5,\n                \"stack\": false,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"sum(rate(traefik_requests_total[5m]))\",\n                    \"interval\": \"\",\n                    \"intervalFactor\": 2,\n                    \"legendFormat\": \"{{requests}}\",\n                    \"refId\": \"A\",\n                    \"step\": 240\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"Requests in last 5 minutes\",\n                \"tooltip\": {\n                  \"shared\": true,\n                  \"sort\": 0,\n                  \"value_type\": \"individual\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  }\n                ]\n              }\n            ],\n            \"repeat\": null,\n            \"repeatIteration\": null,\n            \"repeatRowId\": null,\n            \"showTitle\": false,\n            \"title\": \"General info\",\n            \"titleSize\": \"h6\"\n          },\n          {\n            \"collapse\": false,\n            \"height\": 412,\n            \"panels\": [\n              {\n                \"aliasColors\": {},\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"decimals\": 0,\n                \"fill\": 1,\n                \"id\": 5,\n                \"legend\": {\n                  \"avg\": false,\n                  \"current\": false,\n                  \"max\": false,\n                  \"min\": false,\n                  \"show\": true,\n                  \"total\": false,\n                  \"values\": false\n                },\n                \"lines\": true,\n                \"linewidth\": 1,\n                \"links\": [],\n                \"nullPointMode\": \"null\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [],\n                \"spaceLength\": 10,\n                \"span\": 6,\n                \"stack\": false,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"rate(traefik_requests_total{service=~\\\"http|https\\\",code=\\\"200\\\"}[5m])\",\n                    \"intervalFactor\": 2,\n                    \"legendFormat\": \"{{service}} {{method}} {{code}}\",\n                    \"refId\": \"A\",\n                    \"step\": 240\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"Successful Status Code Count (5min)\",\n                \"tooltip\": {\n                  \"shared\": true,\n                  \"sort\": 0,\n                  \"value_type\": \"individual\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": false\n                  }\n                ]\n              },\n              {\n                \"aliasColors\": {},\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"decimals\": 0,\n                \"fill\": 1,\n                \"id\": 4,\n                \"legend\": {\n                  \"avg\": false,\n                  \"current\": false,\n                  \"max\": false,\n                  \"min\": false,\n                  \"show\": true,\n                  \"total\": false,\n                  \"values\": false\n                },\n                \"lines\": true,\n                \"linewidth\": 1,\n                \"links\": [],\n                \"nullPointMode\": \"null\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [],\n                \"spaceLength\": 10,\n                \"span\": 6,\n                \"stack\": false,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"rate(traefik_requests_total{service=~\\\"http|https\\\",code!=\\\"200\\\"}[5m])\",\n                    \"intervalFactor\": 2,\n                    \"legendFormat\": \"{{service}} {{method}} {{code}}\",\n                    \"refId\": \"A\",\n                    \"step\": 240\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"Bad Status Code Count (5m)\",\n                \"tooltip\": {\n                  \"shared\": true,\n                  \"sort\": 0,\n                  \"value_type\": \"individual\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": false\n                  }\n                ]\n              }\n            ],\n            \"repeat\": null,\n            \"repeatIteration\": null,\n            \"repeatRowId\": null,\n            \"showTitle\": false,\n            \"title\": \"Dashboard Row\",\n            \"titleSize\": \"h6\"\n          },\n          {\n            \"collapse\": false,\n            \"height\": 382,\n            \"panels\": [],\n            \"repeat\": null,\n            \"repeatIteration\": null,\n            \"repeatRowId\": null,\n            \"showTitle\": false,\n            \"title\": \"Detailed statuses\",\n            \"titleSize\": \"h6\"\n          }\n        ],\n        \"schemaVersion\": 14,\n        \"style\": \"dark\",\n        \"tags\": [],\n        \"templating\": {\n          \"list\": []\n        },\n        \"time\": {\n          \"from\": \"now/d\",\n          \"to\": \"now\"\n        },\n        \"timepicker\": {\n          \"refresh_intervals\": [\n            \"5s\",\n            \"10s\",\n            \"30s\",\n            \"1m\",\n            \"5m\",\n            \"15m\",\n            \"30m\",\n            \"1h\",\n            \"2h\",\n            \"1d\"\n          ],\n          \"time_options\": [\n            \"5m\",\n            \"15m\",\n            \"1h\",\n            \"6h\",\n            \"12h\",\n            \"24h\",\n            \"2d\",\n            \"7d\",\n            \"30d\"\n          ]\n        },\n        \"timezone\": \"browser\",\n        \"title\": \"Traefik\",\n        \"version\": 1\n      },\n      \"inputs\": [\n        {\n          \"name\": \"DS_PROMETHEUS\",\n          \"pluginId\": \"prometheus\",\n          \"type\": \"datasource\",\n          \"value\": \"prometheus\"\n        }\n      ],\n      \"overwrite\": true\n    }\n  rook-dashboard.json: |+\n    {\n      \"dashboard\": {\n        \"__inputs\": [\n          {\n            \"description\": \"\",\n            \"label\": \"prometheus\",\n            \"name\": \"DS_PROMETHEUS\",\n            \"pluginId\": \"prometheus\",\n            \"pluginName\": \"Prometheus\",\n            \"type\": \"datasource\"\n          }\n        ],\n        \"__requires\": [\n          {\n            \"id\": \"grafana\",\n            \"name\": \"Grafana\",\n            \"type\": \"grafana\",\n            \"version\": \"4.1.1\"\n          },\n          {\n            \"id\": \"graph\",\n            \"name\": \"Graph\",\n            \"type\": \"panel\",\n            \"version\": \"\"\n          },\n          {\n            \"id\": \"prometheus\",\n            \"name\": \"Prometheus\",\n            \"type\": \"datasource\",\n            \"version\": \"1.0.0\"\n          },\n          {\n            \"id\": \"singlestat\",\n            \"name\": \"Singlestat\",\n            \"type\": \"panel\",\n            \"version\": \"\"\n          }\n        ],\n        \"annotations\": {\n          \"list\": []\n        },\n        \"description\": \"Rook cluster monitoring\",\n        \"editable\": true,\n        \"gnetId\": 917,\n        \"graphTooltip\": 0,\n        \"hideControls\": false,\n        \"id\": null,\n        \"links\": [],\n        \"refresh\": \"1m\",\n        \"rows\": [\n          {\n            \"collapse\": false,\n            \"height\": \"150px\",\n            \"panels\": [\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": false,\n                \"colorValue\": true,\n                \"colors\": [\n                  \"rgba(245, 54, 54, 0.9)\",\n                  \"rgba(237, 129, 40, 0.89)\",\n                  \"rgba(50, 172, 45, 0.97)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"none\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 21,\n                \"interval\": \"1m\",\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 2,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": false,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": false\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"count(ceph_health_status)\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"0,1\",\n                \"title\": \"Status\",\n                \"transparent\": false,\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"100%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  },\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"WARNING\",\n                    \"value\": \"0\"\n                  },\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"HEALTHY\",\n                    \"value\": \"1\"\n                  }\n                ],\n                \"valueName\": \"current\"\n              },\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": false,\n                \"colorValue\": true,\n                \"colors\": [\n                  \"rgba(245, 54, 54, 0.9)\",\n                  \"rgba(237, 129, 40, 0.89)\",\n                  \"rgba(50, 172, 45, 0.97)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"none\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 14,\n                \"interval\": \"1m\",\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 2,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": false,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": false\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_monitor_quorum_count\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"2,3\",\n                \"title\": \"Monitors In Quorum\",\n                \"transparent\": false,\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"100%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"current\"\n              },\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": false,\n                \"colorValue\": false,\n                \"colors\": [\n                  \"rgba(245, 54, 54, 0.9)\",\n                  \"rgba(237, 129, 40, 0.89)\",\n                  \"rgba(50, 172, 45, 0.97)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"none\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 22,\n                \"interval\": \"1m\",\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 2,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": true,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": true\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"count(ceph_pool_available_bytes)\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"\",\n                \"title\": \"Pools\",\n                \"transparent\": false,\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"100%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"current\"\n              },\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": false,\n                \"colorValue\": false,\n                \"colors\": [\n                  \"rgba(50, 172, 45, 0.97)\",\n                  \"rgba(237, 129, 40, 0.89)\",\n                  \"rgba(245, 54, 54, 0.9)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"bytes\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 33,\n                \"interval\": \"1m\",\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 2,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": true,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": true\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_cluster_capacity_bytes\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"0.025,0.1\",\n                \"title\": \"Cluster Capacity\",\n                \"transparent\": false,\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"100%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"current\"\n              },\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": false,\n                \"colorValue\": false,\n                \"colors\": [\n                  \"rgba(50, 172, 45, 0.97)\",\n                  \"rgba(237, 129, 40, 0.89)\",\n                  \"rgba(245, 54, 54, 0.9)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"bytes\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 34,\n                \"interval\": \"1m\",\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 2,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": true,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": true\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_cluster_used_bytes\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"0.025,0.1\",\n                \"title\": \"Used Capacity\",\n                \"transparent\": false,\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"100%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"current\"\n              },\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": false,\n                \"colorValue\": true,\n                \"colors\": [\n                  \"rgba(50, 172, 45, 0.97)\",\n                  \"rgba(237, 129, 40, 0.89)\",\n                  \"rgba(245, 54, 54, 0.9)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"percentunit\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": true,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 23,\n                \"interval\": \"1m\",\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 2,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": true,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": false\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_cluster_available_bytes/ceph_cluster_capacity_bytes\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"70,80\",\n                \"title\": \"Available Capacity\",\n                \"transparent\": false,\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"100%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"current\"\n              }\n            ],\n            \"repeat\": null,\n            \"repeatIteration\": null,\n            \"repeatRowId\": null,\n            \"showTitle\": false,\n            \"title\": \"New row\",\n            \"titleSize\": \"h6\"\n          },\n          {\n            \"collapse\": false,\n            \"height\": \"100px\",\n            \"panels\": [\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": false,\n                \"colorValue\": false,\n                \"colors\": [\n                  \"rgba(245, 54, 54, 0.9)\",\n                  \"rgba(237, 129, 40, 0.89)\",\n                  \"rgba(50, 172, 45, 0.97)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"none\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 26,\n                \"interval\": null,\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 1,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": false,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": false\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_osds_in\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"\",\n                \"title\": \"OSDs IN\",\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"80%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"current\"\n              },\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": true,\n                \"colorValue\": false,\n                \"colors\": [\n                  \"rgba(50, 172, 45, 0.97)\",\n                  \"rgba(237, 40, 40, 0.89)\",\n                  \"rgba(245, 54, 54, 0.9)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"none\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 27,\n                \"interval\": null,\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 1,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": false,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": false\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_osds - ceph_osds_in\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"1,1\",\n                \"title\": \"OSDs OUT\",\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"80%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"current\"\n              },\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": false,\n                \"colorValue\": false,\n                \"colors\": [\n                  \"rgba(245, 54, 54, 0.9)\",\n                  \"rgba(237, 129, 40, 0.89)\",\n                  \"rgba(50, 172, 45, 0.97)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"none\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 28,\n                \"interval\": null,\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 1,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": false,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": false\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"sum(ceph_osd_up)\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"\",\n                \"title\": \"OSDs UP\",\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"80%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"current\"\n              },\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": true,\n                \"colorValue\": false,\n                \"colors\": [\n                  \"rgba(50, 172, 45, 0.97)\",\n                  \"rgba(237, 40, 40, 0.89)\",\n                  \"rgba(245, 54, 54, 0.9)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"none\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 29,\n                \"interval\": null,\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 1,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": false,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": false\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_osds_down\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"1,1\",\n                \"title\": \"OSDs DOWN\",\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"80%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"current\"\n              },\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": false,\n                \"colorValue\": true,\n                \"colors\": [\n                  \"rgba(50, 172, 45, 0.97)\",\n                  \"rgba(237, 129, 40, 0.89)\",\n                  \"rgba(245, 54, 54, 0.9)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"none\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 30,\n                \"interval\": null,\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 2,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": true,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": true\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"avg(ceph_osd_pgs)\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"250,300\",\n                \"title\": \"Agerage PGs per OSD\",\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"80%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"current\"\n              },\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": false,\n                \"colorValue\": true,\n                \"colors\": [\n                  \"rgba(50, 172, 45, 0.97)\",\n                  \"rgba(237, 129, 40, 0.89)\",\n                  \"rgba(245, 54, 54, 0.9)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"s\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 31,\n                \"interval\": null,\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 2,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": true,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": true\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"avg(ceph_osd_perf_apply_latency_seconds)\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"0.01,0.05\",\n                \"title\": \"Agerage OSD Apply Latency\",\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"80%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"avg\"\n              },\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": false,\n                \"colorValue\": true,\n                \"colors\": [\n                  \"rgba(50, 172, 45, 0.97)\",\n                  \"rgba(237, 129, 40, 0.89)\",\n                  \"rgba(245, 54, 54, 0.9)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"s\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 32,\n                \"interval\": null,\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"span\": 2,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": true,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": true\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"avg(ceph_osd_perf_commit_latency_seconds)\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"0.01,0.05\",\n                \"title\": \"Agerage OSD Commit Latency\",\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"80%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"avg\"\n              },\n              {\n                \"cacheTimeout\": null,\n                \"colorBackground\": false,\n                \"colorValue\": true,\n                \"colors\": [\n                  \"rgba(50, 172, 45, 0.97)\",\n                  \"rgba(237, 129, 40, 0.89)\",\n                  \"rgba(245, 54, 54, 0.9)\"\n                ],\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"format\": \"s\",\n                \"gauge\": {\n                  \"maxValue\": 100,\n                  \"minValue\": 0,\n                  \"show\": false,\n                  \"thresholdLabels\": false,\n                  \"thresholdMarkers\": true\n                },\n                \"id\": 24,\n                \"interval\": \"1m\",\n                \"links\": [],\n                \"mappingType\": 1,\n                \"mappingTypes\": [\n                  {\n                    \"name\": \"value to text\",\n                    \"value\": 1\n                  },\n                  {\n                    \"name\": \"range to text\",\n                    \"value\": 2\n                  }\n                ],\n                \"maxDataPoints\": 100,\n                \"nullPointMode\": \"connected\",\n                \"nullText\": null,\n                \"postfix\": \"\",\n                \"postfixFontSize\": \"50%\",\n                \"prefix\": \"\",\n                \"prefixFontSize\": \"50%\",\n                \"rangeMaps\": [\n                  {\n                    \"from\": \"null\",\n                    \"text\": \"N/A\",\n                    \"to\": \"null\"\n                  }\n                ],\n                \"repeat\": null,\n                \"span\": 2,\n                \"sparkline\": {\n                  \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                  \"full\": true,\n                  \"lineColor\": \"rgb(31, 120, 193)\",\n                  \"show\": true\n                },\n                \"tableColumn\": \"\",\n                \"targets\": [\n                  {\n                    \"expr\": \"avg(ceph_monitor_latency_seconds)\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": \"70,80\",\n                \"title\": \"Average Monitor Latency\",\n                \"transparent\": false,\n                \"type\": \"singlestat\",\n                \"valueFontSize\": \"100%\",\n                \"valueMaps\": [\n                  {\n                    \"op\": \"=\",\n                    \"text\": \"N/A\",\n                    \"value\": \"null\"\n                  }\n                ],\n                \"valueName\": \"current\"\n              }\n            ],\n            \"repeat\": null,\n            \"repeatIteration\": null,\n            \"repeatRowId\": null,\n            \"showTitle\": false,\n            \"title\": \"New row\",\n            \"titleSize\": \"h6\"\n          },\n          {\n            \"collapse\": false,\n            \"height\": \"250px\",\n            \"panels\": [\n              {\n                \"aliasColors\": {\n                  \"Available\": \"#EAB839\",\n                  \"Total Capacity\": \"#447EBC\",\n                  \"Used\": \"#BF1B00\",\n                  \"total_avail\": \"#6ED0E0\",\n                  \"total_space\": \"#7EB26D\",\n                  \"total_used\": \"#890F02\"\n                },\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"fill\": 4,\n                \"grid\": {},\n                \"height\": \"300\",\n                \"id\": 1,\n                \"interval\": \"$interval\",\n                \"legend\": {\n                  \"alignAsTable\": true,\n                  \"avg\": true,\n                  \"current\": true,\n                  \"max\": true,\n                  \"min\": true,\n                  \"show\": true,\n                  \"total\": false,\n                  \"values\": true\n                },\n                \"lines\": true,\n                \"linewidth\": 0,\n                \"links\": [],\n                \"minSpan\": null,\n                \"nullPointMode\": \"connected\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [\n                  {\n                    \"alias\": \"Total Capacity\",\n                    \"fill\": 0,\n                    \"linewidth\": 3,\n                    \"stack\": false\n                  }\n                ],\n                \"spaceLength\": 10,\n                \"span\": 4,\n                \"stack\": true,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_cluster_available_bytes\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Available\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_cluster_used_bytes\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Used\",\n                    \"refId\": \"B\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_cluster_capacity_bytes\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Total Capacity\",\n                    \"refId\": \"C\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"Capacity\",\n                \"tooltip\": {\n                  \"msResolution\": false,\n                  \"shared\": true,\n                  \"sort\": 2,\n                  \"value_type\": \"individual\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"bytes\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  }\n                ]\n              },\n              {\n                \"aliasColors\": {\n                  \"Total Capacity\": \"#7EB26D\",\n                  \"Used\": \"#BF1B00\",\n                  \"total_avail\": \"#6ED0E0\",\n                  \"total_space\": \"#7EB26D\",\n                  \"total_used\": \"#890F02\"\n                },\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"decimals\": 0,\n                \"editable\": true,\n                \"error\": false,\n                \"fill\": 1,\n                \"grid\": {},\n                \"height\": \"300\",\n                \"id\": 3,\n                \"interval\": \"$interval\",\n                \"legend\": {\n                  \"alignAsTable\": true,\n                  \"avg\": true,\n                  \"current\": true,\n                  \"max\": true,\n                  \"min\": true,\n                  \"show\": true,\n                  \"total\": false,\n                  \"values\": true\n                },\n                \"lines\": true,\n                \"linewidth\": 2,\n                \"links\": [],\n                \"minSpan\": null,\n                \"nullPointMode\": \"connected\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [],\n                \"spaceLength\": 10,\n                \"span\": 4,\n                \"stack\": true,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_client_io_write_ops\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Write\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_client_io_read_ops\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Read\",\n                    \"refId\": \"B\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"IOPS\",\n                \"tooltip\": {\n                  \"msResolution\": true,\n                  \"shared\": true,\n                  \"sort\": 2,\n                  \"value_type\": \"individual\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"none\",\n                    \"label\": \"\",\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": 0,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": 0,\n                    \"show\": true\n                  }\n                ]\n              },\n              {\n                \"aliasColors\": {},\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"fill\": 1,\n                \"grid\": {},\n                \"height\": \"300\",\n                \"id\": 7,\n                \"interval\": \"$interval\",\n                \"legend\": {\n                  \"alignAsTable\": true,\n                  \"avg\": true,\n                  \"current\": true,\n                  \"max\": true,\n                  \"min\": true,\n                  \"show\": true,\n                  \"total\": false,\n                  \"values\": true\n                },\n                \"lines\": true,\n                \"linewidth\": 2,\n                \"links\": [],\n                \"nullPointMode\": \"connected\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [],\n                \"spaceLength\": 10,\n                \"span\": 4,\n                \"stack\": true,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_client_io_write_bytes\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Write\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_client_io_read_bytes\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Read\",\n                    \"refId\": \"B\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"Throughput\",\n                \"tooltip\": {\n                  \"msResolution\": false,\n                  \"shared\": true,\n                  \"sort\": 2,\n                  \"value_type\": \"individual\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"Bps\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": 0,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": 0,\n                    \"show\": true\n                  }\n                ]\n              }\n            ],\n            \"repeat\": null,\n            \"repeatIteration\": null,\n            \"repeatRowId\": null,\n            \"showTitle\": true,\n            \"title\": \"CLUSTER\",\n            \"titleSize\": \"h6\"\n          },\n          {\n            \"collapse\": false,\n            \"height\": \"250px\",\n            \"panels\": [\n              {\n                \"aliasColors\": {},\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"fill\": 1,\n                \"grid\": {},\n                \"id\": 18,\n                \"legend\": {\n                  \"alignAsTable\": true,\n                  \"avg\": true,\n                  \"current\": true,\n                  \"max\": false,\n                  \"min\": false,\n                  \"rightSide\": true,\n                  \"show\": true,\n                  \"total\": false,\n                  \"values\": true\n                },\n                \"lines\": true,\n                \"linewidth\": 2,\n                \"links\": [],\n                \"nullPointMode\": \"connected\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [\n                  {\n                    \"alias\": \"/^Total.*$/\",\n                    \"stack\": false\n                  }\n                ],\n                \"spaceLength\": 10,\n                \"span\": 12,\n                \"stack\": true,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_cluster_objects\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Total\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_degraded_objects\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Degraded\",\n                    \"refId\": \"B\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_misplaced_objects\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Misplaced\",\n                    \"refId\": \"C\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"Objects in the Cluster\",\n                \"tooltip\": {\n                  \"msResolution\": false,\n                  \"shared\": true,\n                  \"sort\": 1,\n                  \"value_type\": \"individual\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  }\n                ]\n              },\n              {\n                \"aliasColors\": {},\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"fill\": 1,\n                \"grid\": {},\n                \"id\": 19,\n                \"legend\": {\n                  \"alignAsTable\": true,\n                  \"avg\": true,\n                  \"current\": true,\n                  \"max\": false,\n                  \"min\": false,\n                  \"rightSide\": true,\n                  \"show\": true,\n                  \"total\": false,\n                  \"values\": true\n                },\n                \"lines\": true,\n                \"linewidth\": 2,\n                \"links\": [],\n                \"nullPointMode\": \"connected\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [\n                  {\n                    \"alias\": \"/^Total.*$/\",\n                    \"stack\": false\n                  }\n                ],\n                \"spaceLength\": 10,\n                \"span\": 6,\n                \"stack\": true,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"sum(ceph_osd_pgs)\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Total\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_degraded_pgs\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Degraded\",\n                    \"refId\": \"B\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_stale_pgs\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Stale\",\n                    \"refId\": \"C\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_unclean_pgs\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Unclean\",\n                    \"refId\": \"D\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_undersized_pgs\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Undersized\",\n                    \"refId\": \"E\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_stuck_degraded_pgs + ceph_stuck_stale_pgs + ceph_stuck_unclean_pgs + ceph_stuck_undersized_pgs\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Stuck\",\n                    \"refId\": \"F\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"PGs\",\n                \"tooltip\": {\n                  \"msResolution\": false,\n                  \"shared\": true,\n                  \"sort\": 1,\n                  \"value_type\": \"individual\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": 0,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  }\n                ]\n              },\n              {\n                \"aliasColors\": {},\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"fill\": 1,\n                \"grid\": {},\n                \"id\": 20,\n                \"legend\": {\n                  \"alignAsTable\": true,\n                  \"avg\": true,\n                  \"current\": true,\n                  \"max\": false,\n                  \"min\": false,\n                  \"rightSide\": true,\n                  \"show\": true,\n                  \"total\": false,\n                  \"values\": true\n                },\n                \"lines\": true,\n                \"linewidth\": 2,\n                \"links\": [],\n                \"nullPointMode\": \"connected\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [\n                  {\n                    \"alias\": \"/^Total.*$/\",\n                    \"stack\": false\n                  }\n                ],\n                \"spaceLength\": 10,\n                \"span\": 6,\n                \"stack\": true,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_stuck_degraded_pgs\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Degraded\",\n                    \"refId\": \"F\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_stuck_stale_pgs\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Stale\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_stuck_unclean_pgs\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Unclean\",\n                    \"refId\": \"B\",\n                    \"step\": 60\n                  },\n                  {\n                    \"expr\": \"ceph_stuck_undersized_pgs\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Undersized\",\n                    \"refId\": \"C\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"Stuck PGs\",\n                \"tooltip\": {\n                  \"msResolution\": false,\n                  \"shared\": true,\n                  \"sort\": 1,\n                  \"value_type\": \"individual\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": 0,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  }\n                ]\n              }\n            ],\n            \"repeat\": null,\n            \"repeatIteration\": null,\n            \"repeatRowId\": null,\n            \"showTitle\": false,\n            \"title\": \"New row\",\n            \"titleSize\": \"h6\"\n          },\n          {\n            \"collapse\": false,\n            \"height\": \"150px\",\n            \"panels\": [\n              {\n                \"aliasColors\": {},\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"fill\": 1,\n                \"grid\": {},\n                \"id\": 15,\n                \"legend\": {\n                  \"avg\": false,\n                  \"current\": false,\n                  \"max\": false,\n                  \"min\": false,\n                  \"show\": false,\n                  \"total\": false,\n                  \"values\": false\n                },\n                \"lines\": true,\n                \"linewidth\": 2,\n                \"links\": [],\n                \"nullPointMode\": \"connected\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [],\n                \"spaceLength\": 10,\n                \"span\": 4,\n                \"stack\": false,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_recovery_io_bytes\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Bytes\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"Bytes\",\n                \"tooltip\": {\n                  \"msResolution\": false,\n                  \"shared\": true,\n                  \"sort\": 0,\n                  \"value_type\": \"cumulative\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": 0,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  }\n                ]\n              },\n              {\n                \"aliasColors\": {},\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"fill\": 1,\n                \"grid\": {},\n                \"id\": 16,\n                \"legend\": {\n                  \"avg\": false,\n                  \"current\": false,\n                  \"max\": false,\n                  \"min\": false,\n                  \"show\": false,\n                  \"total\": false,\n                  \"values\": false\n                },\n                \"lines\": true,\n                \"linewidth\": 2,\n                \"links\": [],\n                \"nullPointMode\": \"connected\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [\n                  {\n                    \"alias\": \"/^.*/\",\n                    \"color\": \"#E0752D\"\n                  }\n                ],\n                \"spaceLength\": 10,\n                \"span\": 4,\n                \"stack\": false,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_recovery_io_keys\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Keys\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"Keys\",\n                \"tooltip\": {\n                  \"msResolution\": false,\n                  \"shared\": true,\n                  \"sort\": 0,\n                  \"value_type\": \"cumulative\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": 0,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  }\n                ]\n              },\n              {\n                \"aliasColors\": {},\n                \"bars\": false,\n                \"dashLength\": 10,\n                \"dashes\": false,\n                \"datasource\": \"${DS_PROMETHEUS}\",\n                \"editable\": true,\n                \"error\": false,\n                \"fill\": 1,\n                \"grid\": {},\n                \"id\": 17,\n                \"legend\": {\n                  \"avg\": false,\n                  \"current\": false,\n                  \"max\": false,\n                  \"min\": false,\n                  \"show\": false,\n                  \"total\": false,\n                  \"values\": false\n                },\n                \"lines\": true,\n                \"linewidth\": 2,\n                \"links\": [],\n                \"nullPointMode\": \"connected\",\n                \"percentage\": false,\n                \"pointradius\": 5,\n                \"points\": false,\n                \"renderer\": \"flot\",\n                \"seriesOverrides\": [\n                  {\n                    \"alias\": \"/^.*$/\",\n                    \"color\": \"#890F02\"\n                  }\n                ],\n                \"spaceLength\": 10,\n                \"span\": 4,\n                \"stack\": false,\n                \"steppedLine\": false,\n                \"targets\": [\n                  {\n                    \"expr\": \"ceph_recovery_io_objects\",\n                    \"interval\": \"$interval\",\n                    \"intervalFactor\": 1,\n                    \"legendFormat\": \"Objects\",\n                    \"refId\": \"A\",\n                    \"step\": 60\n                  }\n                ],\n                \"thresholds\": [],\n                \"timeFrom\": null,\n                \"timeShift\": null,\n                \"title\": \"Objects\",\n                \"tooltip\": {\n                  \"msResolution\": false,\n                  \"shared\": true,\n                  \"sort\": 0,\n                  \"value_type\": \"cumulative\"\n                },\n                \"type\": \"graph\",\n                \"xaxis\": {\n                  \"buckets\": null,\n                  \"mode\": \"time\",\n                  \"name\": null,\n                  \"show\": true,\n                  \"values\": []\n                },\n                \"yaxes\": [\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": 0,\n                    \"show\": true\n                  },\n                  {\n                    \"format\": \"short\",\n                    \"label\": null,\n                    \"logBase\": 1,\n                    \"max\": null,\n                    \"min\": null,\n                    \"show\": true\n                  }\n                ]\n              }\n            ],\n            \"repeat\": null,\n            \"repeatIteration\": null,\n            \"repeatRowId\": null,\n            \"showTitle\": true,\n            \"title\": \"Recovery\",\n            \"titleSize\": \"h6\"\n          }\n        ],\n        \"schemaVersion\": 14,\n        \"style\": \"dark\",\n        \"tags\": [\n          \"ceph\",\n          \"rook\"\n        ],\n        \"templating\": {\n          \"list\": [\n            {\n              \"auto\": true,\n              \"auto_count\": 10,\n              \"auto_min\": \"1m\",\n              \"current\": {\n                \"text\": \"1m\",\n                \"value\": \"1m\"\n              },\n              \"datasource\": null,\n              \"hide\": 0,\n              \"includeAll\": false,\n              \"label\": \"Interval\",\n              \"multi\": false,\n              \"name\": \"interval\",\n              \"options\": [\n                {\n                  \"selected\": false,\n                  \"text\": \"auto\",\n                  \"value\": \"$__auto_interval\"\n                },\n                {\n                  \"selected\": true,\n                  \"text\": \"1m\",\n                  \"value\": \"1m\"\n                },\n                {\n                  \"selected\": false,\n                  \"text\": \"10m\",\n                  \"value\": \"10m\"\n                },\n                {\n                  \"selected\": false,\n                  \"text\": \"30m\",\n                  \"value\": \"30m\"\n                },\n                {\n                  \"selected\": false,\n                  \"text\": \"1h\",\n                  \"value\": \"1h\"\n                },\n                {\n                  \"selected\": false,\n                  \"text\": \"6h\",\n                  \"value\": \"6h\"\n                },\n                {\n                  \"selected\": false,\n                  \"text\": \"12h\",\n                  \"value\": \"12h\"\n                },\n                {\n                  \"selected\": false,\n                  \"text\": \"1d\",\n                  \"value\": \"1d\"\n                },\n                {\n                  \"selected\": false,\n                  \"text\": \"7d\",\n                  \"value\": \"7d\"\n                },\n                {\n                  \"selected\": false,\n                  \"text\": \"14d\",\n                  \"value\": \"14d\"\n                },\n                {\n                  \"selected\": false,\n                  \"text\": \"30d\",\n                  \"value\": \"30d\"\n                }\n              ],\n              \"query\": \"1m,10m,30m,1h,6h,12h,1d,7d,14d,30d\",\n              \"refresh\": 2,\n              \"type\": \"interval\"\n            }\n          ]\n        },\n        \"time\": {\n          \"from\": \"now-1h\",\n          \"to\": \"now\"\n        },\n        \"timepicker\": {\n          \"refresh_intervals\": [\n            \"5s\",\n            \"10s\",\n            \"30s\",\n            \"1m\",\n            \"5m\",\n            \"15m\",\n            \"30m\",\n            \"1h\",\n            \"2h\",\n            \"1d\"\n          ],\n          \"time_options\": [\n            \"5m\",\n            \"15m\",\n            \"1h\",\n            \"6h\",\n            \"12h\",\n            \"24h\",\n            \"2d\",\n            \"7d\",\n            \"30d\"\n          ]\n        },\n        \"timezone\": \"browser\",\n        \"title\": \"Rook\",\n        \"version\": 3\n      },\n      \"inputs\": [\n        {\n          \"name\": \"DS_PROMETHEUS\",\n          \"pluginId\": \"prometheus\",\n          \"type\": \"datasource\",\n          \"value\": \"prometheus\"\n        }\n      ],\n      \"overwrite\": true\n    }\n  resource-requests-dashboard.json: |+\n    {\n      \"dashboard\":\n    {\n        \"__inputs\": [\n            {\n                \"description\": \"\",\n                \"label\": \"prometheus\",\n                \"name\": \"DS_PROMETHEUS\",\n                \"pluginId\": \"prometheus\",\n                \"pluginName\": \"Prometheus\",\n                \"type\": \"datasource\"\n            }\n        ],\n        \"__requires\": [\n            {\n                \"id\": \"grafana\",\n                \"name\": \"Grafana\",\n                \"type\": \"grafana\",\n                \"version\": \"4.1.1\"\n            },\n            {\n                \"id\": \"graph\",\n                \"name\": \"Graph\",\n                \"type\": \"panel\",\n                \"version\": \"\"\n            },\n            {\n                \"id\": \"prometheus\",\n                \"name\": \"Prometheus\",\n                \"type\": \"datasource\",\n                \"version\": \"1.0.0\"\n            },\n            {\n                \"id\": \"singlestat\",\n                \"name\": \"Singlestat\",\n                \"type\": \"panel\",\n                \"version\": \"\"\n            }\n        ],\n        \"annotations\": {\n            \"list\": []\n        },\n        \"description\": \"Dashboard to show the resource requests vs allocatable in the cluster\",\n        \"editable\": true,\n        \"gnetId\": null,\n        \"graphTooltip\": 0,\n        \"hideControls\": false,\n        \"id\": null,\n        \"links\": [],\n        \"rows\": [\n            {\n                \"collapse\": false,\n                \"height\": \"300\",\n                \"panels\": [\n                    {\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"description\": \"This represents the total [CPU resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu) in the cluster.\\nFor comparison the total [allocatable CPU cores](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node-allocatable.md) is also shown.\",\n                        \"fill\": 1,\n                        \"id\": 1,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 1,\n                        \"links\": [],\n                        \"nullPointMode\": \"null\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [],\n                        \"span\": 9,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"min(sum(kube_node_status_allocatable_cpu_cores) by (instance))\",\n                                \"hide\": false,\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"Allocatable CPU Cores\",\n                                \"refId\": \"A\",\n                                \"step\": 10\n                            },\n                            {\n                                \"expr\": \"max(sum(kube_pod_container_resource_requests_cpu_cores) by (instance))\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"Requested CPU Cores\",\n                                \"refId\": \"B\",\n                                \"step\": 10\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"CPU Cores\",\n                        \"tooltip\": {\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"individual\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"short\",\n                                \"label\": \"CPU Cores\",\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"short\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    },\n                    {\n                        \"cacheTimeout\": null,\n                        \"colorBackground\": false,\n                        \"colorValue\": false,\n                        \"colors\": [\n                            \"rgba(50, 172, 45, 0.97)\",\n                            \"rgba(237, 129, 40, 0.89)\",\n                            \"rgba(245, 54, 54, 0.9)\"\n                        ],\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"decimals\": null,\n                        \"format\": \"percent\",\n                        \"gauge\": {\n                            \"maxValue\": 100,\n                            \"minValue\": 0,\n                            \"show\": true,\n                            \"thresholdLabels\": false,\n                            \"thresholdMarkers\": true\n                        },\n                        \"id\": 2,\n                        \"interval\": null,\n                        \"links\": [],\n                        \"mappingType\": 1,\n                        \"mappingTypes\": [\n                            {\n                                \"name\": \"value to text\",\n                                \"value\": 1\n                            },\n                            {\n                                \"name\": \"range to text\",\n                                \"value\": 2\n                            }\n                        ],\n                        \"maxDataPoints\": 100,\n                        \"nullPointMode\": \"connected\",\n                        \"nullText\": null,\n                        \"postfix\": \"\",\n                        \"postfixFontSize\": \"50%\",\n                        \"prefix\": \"\",\n                        \"prefixFontSize\": \"50%\",\n                        \"rangeMaps\": [\n                            {\n                                \"from\": \"null\",\n                                \"text\": \"N/A\",\n                                \"to\": \"null\"\n                            }\n                        ],\n                        \"span\": 3,\n                        \"sparkline\": {\n                            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                            \"full\": false,\n                            \"lineColor\": \"rgb(31, 120, 193)\",\n                            \"show\": true\n                        },\n                        \"targets\": [\n                            {\n                                \"expr\": \"max(sum(kube_pod_container_resource_requests_cpu_cores) by (instance)) / min(sum(kube_node_status_allocatable_cpu_cores) by (instance)) * 100\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"\",\n                                \"refId\": \"A\",\n                                \"step\": 240\n                            }\n                        ],\n                        \"thresholds\": \"80, 90\",\n                        \"title\": \"CPU Cores\",\n                        \"type\": \"singlestat\",\n                        \"valueFontSize\": \"110%\",\n                        \"valueMaps\": [\n                            {\n                                \"op\": \"=\",\n                                \"text\": \"N/A\",\n                                \"value\": \"null\"\n                            }\n                        ],\n                        \"valueName\": \"avg\"\n                    }\n                ],\n                \"repeat\": null,\n                \"repeatIteration\": null,\n                \"repeatRowId\": null,\n                \"showTitle\": false,\n                \"title\": \"CPU Cores\",\n                \"titleSize\": \"h6\"\n            },\n            {\n                \"collapse\": false,\n                \"height\": \"300\",\n                \"panels\": [\n                    {\n                        \"aliasColors\": {},\n                        \"bars\": false,\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"description\": \"This represents the total [memory resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory) in the cluster.\\nFor comparison the total [allocatable memory](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node-allocatable.md) is also shown.\",\n                        \"fill\": 1,\n                        \"id\": 3,\n                        \"legend\": {\n                            \"avg\": false,\n                            \"current\": false,\n                            \"max\": false,\n                            \"min\": false,\n                            \"show\": true,\n                            \"total\": false,\n                            \"values\": false\n                        },\n                        \"lines\": true,\n                        \"linewidth\": 1,\n                        \"links\": [],\n                        \"nullPointMode\": \"null\",\n                        \"percentage\": false,\n                        \"pointradius\": 5,\n                        \"points\": false,\n                        \"renderer\": \"flot\",\n                        \"seriesOverrides\": [],\n                        \"span\": 9,\n                        \"stack\": false,\n                        \"steppedLine\": false,\n                        \"targets\": [\n                            {\n                                \"expr\": \"min(sum(kube_node_status_allocatable_memory_bytes) by (instance))\",\n                                \"hide\": false,\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"Allocatable Memory\",\n                                \"refId\": \"A\",\n                                \"step\": 10\n                            },\n                            {\n                                \"expr\": \"max(sum(kube_pod_container_resource_requests_memory_bytes) by (instance))\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"Requested Memory\",\n                                \"refId\": \"B\",\n                                \"step\": 10\n                            }\n                        ],\n                        \"thresholds\": [],\n                        \"timeFrom\": null,\n                        \"timeShift\": null,\n                        \"title\": \"Memory\",\n                        \"tooltip\": {\n                            \"shared\": true,\n                            \"sort\": 0,\n                            \"value_type\": \"individual\"\n                        },\n                        \"type\": \"graph\",\n                        \"xaxis\": {\n                            \"mode\": \"time\",\n                            \"name\": null,\n                            \"show\": true,\n                            \"values\": []\n                        },\n                        \"yaxes\": [\n                            {\n                                \"format\": \"bytes\",\n                                \"label\": \"Memory\",\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            },\n                            {\n                                \"format\": \"short\",\n                                \"label\": null,\n                                \"logBase\": 1,\n                                \"max\": null,\n                                \"min\": null,\n                                \"show\": true\n                            }\n                        ]\n                    },\n                    {\n                        \"cacheTimeout\": null,\n                        \"colorBackground\": false,\n                        \"colorValue\": false,\n                        \"colors\": [\n                            \"rgba(50, 172, 45, 0.97)\",\n                            \"rgba(237, 129, 40, 0.89)\",\n                            \"rgba(245, 54, 54, 0.9)\"\n                        ],\n                        \"datasource\": \"${DS_PROMETHEUS}\",\n                        \"decimals\": null,\n                        \"format\": \"percent\",\n                        \"gauge\": {\n                            \"maxValue\": 100,\n                            \"minValue\": 0,\n                            \"show\": true,\n                            \"thresholdLabels\": false,\n                            \"thresholdMarkers\": true\n                        },\n                        \"id\": 4,\n                        \"interval\": null,\n                        \"links\": [],\n                        \"mappingType\": 1,\n                        \"mappingTypes\": [\n                            {\n                                \"name\": \"value to text\",\n                                \"value\": 1\n                            },\n                            {\n                                \"name\": \"range to text\",\n                                \"value\": 2\n                            }\n                        ],\n                        \"maxDataPoints\": 100,\n                        \"nullPointMode\": \"connected\",\n                        \"nullText\": null,\n                        \"postfix\": \"\",\n                        \"postfixFontSize\": \"50%\",\n                        \"prefix\": \"\",\n                        \"prefixFontSize\": \"50%\",\n                        \"rangeMaps\": [\n                            {\n                                \"from\": \"null\",\n                                \"text\": \"N/A\",\n                                \"to\": \"null\"\n                            }\n                        ],\n                        \"span\": 3,\n                        \"sparkline\": {\n                            \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n                            \"full\": false,\n                            \"lineColor\": \"rgb(31, 120, 193)\",\n                            \"show\": true\n                        },\n                        \"targets\": [\n                            {\n                                \"expr\": \"max(sum(kube_pod_container_resource_requests_memory_bytes) by (instance)) / min(sum(kube_node_status_allocatable_memory_bytes) by (instance)) * 100\",\n                                \"intervalFactor\": 2,\n                                \"legendFormat\": \"\",\n                                \"refId\": \"A\",\n                                \"step\": 240\n                            }\n                        ],\n                        \"thresholds\": \"80, 90\",\n                        \"title\": \"Memory\",\n                        \"type\": \"singlestat\",\n                        \"valueFontSize\": \"110%\",\n                        \"valueMaps\": [\n                            {\n                                \"op\": \"=\",\n                                \"text\": \"N/A\",\n                                \"value\": \"null\"\n                            }\n                        ],\n                        \"valueName\": \"avg\"\n                    }\n                ],\n                \"repeat\": null,\n                \"repeatIteration\": null,\n                \"repeatRowId\": null,\n                \"showTitle\": false,\n                \"title\": \"Memory\",\n                \"titleSize\": \"h6\"\n            }\n        ],\n        \"schemaVersion\": 14,\n        \"style\": \"dark\",\n        \"tags\": [],\n        \"templating\": {\n            \"list\": []\n        },\n        \"time\": {\n            \"from\": \"now-3h\",\n            \"to\": \"now\"\n        },\n        \"timepicker\": {\n            \"refresh_intervals\": [\n                \"5s\",\n                \"10s\",\n                \"30s\",\n                \"1m\",\n                \"5m\",\n                \"15m\",\n                \"30m\",\n                \"1h\",\n                \"2h\",\n                \"1d\"\n            ],\n            \"time_options\": [\n                \"5m\",\n                \"15m\",\n                \"1h\",\n                \"6h\",\n                \"12h\",\n                \"24h\",\n                \"2d\",\n                \"7d\",\n                \"30d\"\n            ]\n        },\n        \"timezone\": \"browser\",\n        \"title\": \"Resource Requests\",\n        \"version\": 1\n    }\n    ,\n      \"inputs\": [\n        {\n          \"name\": \"DS_PROMETHEUS\",\n          \"pluginId\": \"prometheus\",\n          \"type\": \"datasource\",\n          \"value\": \"prometheus\"\n        }\n      ],\n      \"overwrite\": true\n    }\n  prometheus-datasource.json: |+\n    {\n        \"access\": \"proxy\",\n        \"basicAuth\": false,\n        \"name\": \"prometheus\",\n        \"type\": \"prometheus\",\n        \"url\": \"http://prometheus-k8s.monitoring.svc:9090\"\n    }\n"
  },
  {
    "path": "manifests/grafana/grafana-deployment.yaml",
    "content": "apiVersion: extensions/v1beta1\nkind: Deployment\nmetadata:\n  name: grafana\nspec:\n  replicas: 1\n  template:\n    metadata:\n      labels:\n        app: grafana\n    spec:\n      containers:\n      - name: grafana\n        image: grafana/grafana:4.4.1\n        env:\n        - name: GF_AUTH_BASIC_ENABLED\n          value: \"true\"\n        - name: GF_AUTH_ANONYMOUS_ENABLED\n          value: \"true\"\n        - name: GF_SECURITY_ADMIN_USER\n          valueFrom:\n            secretKeyRef:\n              name: grafana-credentials\n              key: user\n        - name: GF_SECURITY_ADMIN_PASSWORD\n          valueFrom:\n            secretKeyRef:\n              name: grafana-credentials\n              key: password\n        volumeMounts:\n        - name: grafana-storage\n          mountPath: /var/grafana-storage\n        ports:\n        - name: web\n          containerPort: 3000\n        resources:\n          requests:\n            memory: 100Mi\n            cpu: 100m\n          limits:\n            memory: 200Mi\n            cpu: 200m\n      - name: grafana-watcher\n        image: quay.io/coreos/grafana-watcher:v0.0.6\n        args:\n          - '--watch-dir=/var/grafana-dashboards'\n          - '--grafana-url=http://localhost:3000'\n        env:\n        - name: GRAFANA_USER\n          valueFrom:\n            secretKeyRef:\n              name: grafana-credentials\n              key: user\n        - name: GRAFANA_PASSWORD\n          valueFrom:\n            secretKeyRef:\n              name: grafana-credentials\n              key: password\n        resources:\n          requests:\n            memory: \"16Mi\"\n            cpu: \"50m\"\n          limits:\n            memory: \"32Mi\"\n            cpu: \"100m\"\n        volumeMounts:\n        - name: grafana-dashboards\n          mountPath: /var/grafana-dashboards\n      volumes:\n      - name: grafana-storage\n        emptyDir: {}\n      - name: grafana-dashboards\n        configMap:\n          name: grafana-dashboards\n"
  },
  {
    "path": "manifests/grafana/grafana-service.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: grafana\n  labels:\n    app: grafana\nspec:\n  ports:\n  - name: web\n    port: 3000\n    protocol: TCP\n  selector:\n    app: grafana\n"
  },
  {
    "path": "manifests/heapster.yaml",
    "content": "apiVersion: extensions/v1beta1\nkind: Deployment\nmetadata:\n  name: heapster\n  namespace: kube-system\n  labels:\n    k8s-app: heapster\n    kubernetes.io/cluster-service: \"true\"\nspec:\n  replicas: 1\n  template:\n    metadata:\n      labels:\n        task: monitoring\n        k8s-app: heapster\n    spec:\n      serviceAccountName: heapster\n      containers:\n      - name: heapster\n        image: gcr.io/google_containers/heapster-amd64:v1.5.1\n        imagePullPolicy: IfNotPresent\n        command:\n        - /heapster\n        - --source=kubernetes:https://kubernetes.default\n      tolerations:\n      - key: CriticalAddonsOnly\n        operator: Exists\n      - key: node-role.kubernetes.io/master\n        operator: Exists\n        effect: NoSchedule\n---\napiVersion: v1\nkind: Service\nmetadata:\n  labels:\n    task: monitoring\n    kubernetes.io/cluster-service: 'true'\n    kubernetes.io/name: Heapster\n  name: heapster\n  namespace: kube-system\nspec:\n  ports:\n  - port: 80\n    targetPort: 8082\n  selector:\n    k8s-app: heapster\n---\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: heapster\n  namespace: kube-system\n---\nkind: ClusterRoleBinding\napiVersion: rbac.authorization.k8s.io/v1beta1\nmetadata:\n  name: heapster\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: system:heapster\nsubjects:\n- kind: ServiceAccount\n  name: heapster\n  namespace: kube-system\n"
  },
  {
    "path": "manifests/kube-dashboard.yaml",
    "content": "apiVersion: v1\nkind: Secret\nmetadata:\n  labels:\n    k8s-app: kubernetes-dashboard\n  name: kubernetes-dashboard-certs\n  namespace: kube-system\ntype: Opaque\n---\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  labels:\n    k8s-app: kubernetes-dashboard\n  name: kubernetes-dashboard\n  namespace: kube-system\n---\nkind: Deployment\napiVersion: apps/v1beta2\nmetadata:\n  labels:\n    k8s-app: kubernetes-dashboard\n  name: kubernetes-dashboard\n  namespace: kube-system\nspec:\n  replicas: 1\n  revisionHistoryLimit: 10\n  selector:\n    matchLabels:\n      k8s-app: kubernetes-dashboard\n  template:\n    metadata:\n      labels:\n        k8s-app: kubernetes-dashboard\n    spec:\n      containers:\n      - name: kubernetes-dashboard\n        image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.8.3\n        ports:\n        - containerPort: 8443\n          protocol: TCP\n        args:\n          - --auto-generate-certificates\n          # Uncomment the following line to manually specify Kubernetes API server Host\n          # If not specified, Dashboard will attempt to auto discover the API server and connect\n          # to it. Uncomment only if the default does not work.\n          # - --apiserver-host=http://my-address:port\n        volumeMounts:\n        - name: kubernetes-dashboard-certs\n          mountPath: /certs\n          # Create on-disk volume to store exec logs\n        - mountPath: /tmp\n          name: tmp-volume\n        livenessProbe:\n          httpGet:\n            scheme: HTTPS\n            path: /\n            port: 8443\n          initialDelaySeconds: 30\n          timeoutSeconds: 30\n      volumes:\n      - name: kubernetes-dashboard-certs\n        secret:\n          secretName: kubernetes-dashboard-certs\n      - name: tmp-volume\n        emptyDir: {}\n      serviceAccountName: kubernetes-dashboard\n      # Comment the following tolerations if Dashboard must not be deployed on master\n      tolerations:\n      - key: node-role.kubernetes.io/master\n        effect: NoSchedule\n---\nkind: Service\napiVersion: v1\nmetadata:\n  labels:\n    k8s-app: kubernetes-dashboard\n  name: kubernetes-dashboard\n  namespace: kube-system\nspec:\n  ports:\n    - port: 443\n      targetPort: 8443\n  selector:\n    k8s-app: kubernetes-dashboard\n---\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: ClusterRoleBinding\nmetadata:\n  name: kubernetes-dashboard\n  labels:\n    k8s-app: kubernetes-dashboard\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: cluster-admin\nsubjects:\n- kind: ServiceAccount\n  name: kubernetes-dashboard\n  namespace: kube-system\n---\napiVersion: extensions/v1beta1\nkind: Ingress\nmetadata:\n  name: dashboard-ingress\n  namespace: kube-system\n  annotations:\n    kubernetes.io/ingress.class: \"traefik\"\n    ingress.kubernetes.io/auth-type: \"basic\"\n    ingress.kubernetes.io/auth-secret: \"kubesecret\"\nspec:\n  rules:\n    - host: kube.${DOMAIN}\n      http:\n        paths:\n          - backend:\n              serviceName: kubernetes-dashboard\n              servicePort: 443\n"
  },
  {
    "path": "manifests/kube-state-metrics/kube-state-metrics-cluster-role-binding.yaml",
    "content": "apiVersion: rbac.authorization.k8s.io/v1beta1\nkind: ClusterRoleBinding\nmetadata:\n  name: kube-state-metrics\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: kube-state-metrics\nsubjects:\n- kind: ServiceAccount\n  name: kube-state-metrics\n  namespace: monitoring\n"
  },
  {
    "path": "manifests/kube-state-metrics/kube-state-metrics-cluster-role.yaml",
    "content": "apiVersion: rbac.authorization.k8s.io/v1beta1\nkind: ClusterRole\nmetadata:\n  name: kube-state-metrics\nrules:\n- apiGroups: [\"\"]\n  resources:\n  - nodes\n  - pods\n  - services\n  - resourcequotas\n  - replicationcontrollers\n  - limitranges\n  verbs: [\"list\", \"watch\"]\n- apiGroups: [\"extensions\"]\n  resources:\n  - daemonsets\n  - deployments\n  - replicasets\n  verbs: [\"list\", \"watch\"]\n"
  },
  {
    "path": "manifests/kube-state-metrics/kube-state-metrics-deployment.yaml",
    "content": "apiVersion: extensions/v1beta1\nkind: Deployment\nmetadata:\n  name: kube-state-metrics\nspec:\n  replicas: 1\n  template:\n    metadata:\n      labels:\n        app: kube-state-metrics\n    spec:\n      serviceAccountName: kube-state-metrics\n      containers:\n      - name: kube-state-metrics\n        image: quay.io/coreos/kube-state-metrics:v0.5.0\n        ports:\n        - name: metrics\n          containerPort: 8080\n        resources:\n          requests:\n            memory: 100Mi\n            cpu: 100m\n          limits:\n            memory: 200Mi\n            cpu: 200m\n\n"
  },
  {
    "path": "manifests/kube-state-metrics/kube-state-metrics-service-account.yaml",
    "content": "apiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: kube-state-metrics\n"
  },
  {
    "path": "manifests/kube-state-metrics/kube-state-metrics-service.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  labels:\n    app: kube-state-metrics\n    k8s-app: kube-state-metrics\n  name: kube-state-metrics\nspec:\n  ports:\n  - name: http-metrics\n    port: 8080\n    targetPort: metrics\n    protocol: TCP\n  selector:\n    app: kube-state-metrics\n\n"
  },
  {
    "path": "manifests/node-exporter/node-exporter-daemonset.yaml",
    "content": "apiVersion: extensions/v1beta1\nkind: DaemonSet\nmetadata:\n  name: node-exporter\nspec:\n  template:\n    metadata:\n      labels:\n        app: node-exporter\n      name: node-exporter\n    spec:\n      hostNetwork: true\n      hostPID: true\n      containers:\n      - image:  quay.io/prometheus/node-exporter:v0.14.0\n        args:\n        - \"-collector.procfs=/host/proc\"\n        - \"-collector.sysfs=/host/sys\"\n        name: node-exporter\n        ports:\n        - containerPort: 9100\n          hostPort: 9100\n          name: scrape\n        resources:\n          requests:\n            memory: 30Mi\n            cpu: 100m\n          limits:\n            memory: 50Mi\n            cpu: 200m\n        volumeMounts:\n        - name: proc\n          readOnly:  true\n          mountPath: /host/proc\n        - name: sys\n          readOnly: true\n          mountPath: /host/sys\n      volumes:\n      - name: proc\n        hostPath:\n          path: /proc\n      - name: sys\n        hostPath:\n          path: /sys\n\n"
  },
  {
    "path": "manifests/node-exporter/node-exporter-service.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  labels:\n    app: node-exporter\n    k8s-app: node-exporter\n  name: node-exporter\nspec:\n  type: ClusterIP\n  clusterIP: None\n  ports:\n  - name: http-metrics\n    port: 9100\n    protocol: TCP\n  selector:\n    app: node-exporter\n\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-ingress.yaml",
    "content": "apiVersion: extensions/v1beta1\nkind: Ingress\nmetadata:\n  name: prometheus-ingress\n  namespace: monitoring\n  annotations:\n    kubernetes.io/ingress.class: \"traefik\"\n    ingress.kubernetes.io/auth-type: \"basic\"\n    ingress.kubernetes.io/auth-secret: \"kubesecret\"\nspec:\n  rules:\n    - host: alertmanager.${DOMAIN}\n      http:\n        paths:\n          - backend:\n              serviceName: alertmanager-main\n              servicePort: web\n    - host: prometheus.${DOMAIN}\n      http:\n        paths:\n          - backend:\n              serviceName: prometheus-k8s\n              servicePort: web\n    - host: grafana.${DOMAIN}\n      http:\n        paths:\n          - backend:\n              serviceName: grafana\n              servicePort: web\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-role-bindings.yaml",
    "content": "apiVersion: rbac.authorization.k8s.io/v1beta1\nkind: RoleBinding\nmetadata:\n  name: prometheus-k8s\n  namespace: monitoring\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: Role\n  name: prometheus-k8s\nsubjects:\n- kind: ServiceAccount\n  name: prometheus-k8s\n  namespace: monitoring\n---\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: RoleBinding\nmetadata:\n  name: prometheus-k8s\n  namespace: kube-system\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: Role\n  name: prometheus-k8s\nsubjects:\n- kind: ServiceAccount\n  name: prometheus-k8s\n  namespace: monitoring\n---\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: RoleBinding\nmetadata:\n  name: prometheus-k8s\n  namespace: rook\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: Role\n  name: prometheus-k8s\nsubjects:\n- kind: ServiceAccount\n  name: prometheus-k8s\n  namespace: monitoring\n---\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: RoleBinding\nmetadata:\n  name: prometheus-k8s\n  namespace: default\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: Role\n  name: prometheus-k8s\nsubjects:\n- kind: ServiceAccount\n  name: prometheus-k8s\n  namespace: monitoring\n---\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: ClusterRoleBinding\nmetadata:\n  name: prometheus-k8s\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: prometheus-k8s\nsubjects:\n- kind: ServiceAccount\n  name: prometheus-k8s\n  namespace: monitoring\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-roles.yaml",
    "content": "apiVersion: rbac.authorization.k8s.io/v1beta1\nkind: Role\nmetadata:\n  name: prometheus-k8s\n  namespace: monitoring\nrules:\n- apiGroups: [\"\"]\n  resources:\n  - nodes\n  - services\n  - endpoints\n  - pods\n  verbs: [\"get\", \"list\", \"watch\"]\n- apiGroups: [\"\"]\n  resources:\n  - configmaps\n  verbs: [\"get\"]\n---\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: Role\nmetadata:\n  name: prometheus-k8s\n  namespace: rook\nrules:\n- apiGroups: [\"\"]\n  resources:\n  - nodes\n  - services\n  - endpoints\n  - pods\n  verbs: [\"get\", \"list\", \"watch\"]\n- apiGroups: [\"\"]\n  resources:\n  - configmaps\n  verbs: [\"get\"]\n---\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: Role\nmetadata:\n  name: prometheus-k8s\n  namespace: kube-system\nrules:\n- apiGroups: [\"\"]\n  resources:\n  - services\n  - endpoints\n  - pods\n  verbs: [\"get\", \"list\", \"watch\"]\n---\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: Role\nmetadata:\n  name: prometheus-k8s\n  namespace: default\nrules:\n- apiGroups: [\"\"]\n  resources:\n  - services\n  - endpoints\n  - pods\n  verbs: [\"get\", \"list\", \"watch\"]\n---\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: ClusterRole\nmetadata:\n  name: prometheus-k8s\nrules:\n- nonResourceURLs: [\"/metrics\"]\n  verbs: [\"get\"]\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-rules.yaml",
    "content": "apiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: prometheus-k8s-rules\n  labels:\n    role: prometheus-rulefiles\n    prometheus: k8s\ndata:\n  alertmanager.rules.yaml: |+\n    groups:\n    - name: ./alertmanager.rules\n      rules:\n      - alert: AlertmanagerConfigInconsistent\n        expr: count_values(\"config_hash\", alertmanager_config_hash) BY (service) / ON(service)\n          GROUP_LEFT() label_replace(prometheus_operator_alertmanager_spec_replicas, \"service\",\n          \"alertmanager-$1\", \"alertmanager\", \"(.*)\") != 1\n        for: 5m\n        labels:\n          severity: critical\n        annotations:\n          description: The configuration of the instances of the Alertmanager cluster\n            `{{$labels.service}}` are out of sync.\n          summary: Alertmanager configurations are inconsistent\n      - alert: AlertmanagerDownOrMissing\n        expr: label_replace(prometheus_operator_alertmanager_spec_replicas, \"job\", \"alertmanager-$1\",\n          \"alertmanager\", \"(.*)\") / ON(job) GROUP_RIGHT() sum(up) BY (job) != 1\n        for: 5m\n        labels:\n          severity: warning\n        annotations:\n          description: An unexpected number of Alertmanagers are scraped or Alertmanagers\n            disappeared from discovery.\n          summary: Alertmanager down or not discovered\n      - alert: FailedReload\n        expr: alertmanager_config_last_reload_successful == 0\n        for: 10m\n        labels:\n          severity: warning\n        annotations:\n          description: Reloading Alertmanager's configuration has failed for {{ $labels.namespace\n            }}/{{ $labels.pod}}.\n          summary: Alertmanager configuration reload has failed\n  etcd3.rules.yaml: |+\n    groups:\n    - name: ./etcd3.rules\n      rules:\n      - alert: InsufficientMembers\n        expr: count(up{job=\"etcd\"} == 0) > (count(up{job=\"etcd\"}) / 2 - 1)\n        for: 3m\n        labels:\n          severity: critical\n        annotations:\n          description: If one more etcd member goes down the cluster will be unavailable\n          summary: etcd cluster insufficient members\n      - alert: NoLeader\n        expr: etcd_server_has_leader{job=\"etcd\"} == 0\n        for: 1m\n        labels:\n          severity: critical\n        annotations:\n          description: etcd member {{ $labels.instance }} has no leader\n          summary: etcd member has no leader\n      - alert: HighNumberOfLeaderChanges\n        expr: increase(etcd_server_leader_changes_seen_total{job=\"etcd\"}[1h]) > 3\n        labels:\n          severity: warning\n        annotations:\n          description: etcd instance {{ $labels.instance }} has seen {{ $value }} leader\n            changes within the last hour\n          summary: a high number of leader changes within the etcd cluster are happening\n      - alert: HighNumberOfFailedGRPCRequests\n        expr: sum(rate(etcd_grpc_requests_failed_total{job=\"etcd\"}[5m])) BY (grpc_method)\n          / sum(rate(etcd_grpc_total{job=\"etcd\"}[5m])) BY (grpc_method) > 0.01\n        for: 10m\n        labels:\n          severity: warning\n        annotations:\n          description: '{{ $value }}% of requests for {{ $labels.grpc_method }} failed\n            on etcd instance {{ $labels.instance }}'\n          summary: a high number of gRPC requests are failing\n      - alert: HighNumberOfFailedGRPCRequests\n        expr: sum(rate(etcd_grpc_requests_failed_total{job=\"etcd\"}[5m])) BY (grpc_method)\n          / sum(rate(etcd_grpc_total{job=\"etcd\"}[5m])) BY (grpc_method) > 0.05\n        for: 5m\n        labels:\n          severity: critical\n        annotations:\n          description: '{{ $value }}% of requests for {{ $labels.grpc_method }} failed\n            on etcd instance {{ $labels.instance }}'\n          summary: a high number of gRPC requests are failing\n      - alert: GRPCRequestsSlow\n        expr: histogram_quantile(0.99, rate(etcd_grpc_unary_requests_duration_seconds_bucket[5m]))\n          > 0.15\n        for: 10m\n        labels:\n          severity: critical\n        annotations:\n          description: on etcd instance {{ $labels.instance }} gRPC requests to {{ $labels.grpc_method\n            }} are slow\n          summary: slow gRPC requests\n      - alert: HighNumberOfFailedHTTPRequests\n        expr: sum(rate(etcd_http_failed_total{job=\"etcd\"}[5m])) BY (method) / sum(rate(etcd_http_received_total{job=\"etcd\"}[5m]))\n          BY (method) > 0.01\n        for: 10m\n        labels:\n          severity: warning\n        annotations:\n          description: '{{ $value }}% of requests for {{ $labels.method }} failed on etcd\n            instance {{ $labels.instance }}'\n          summary: a high number of HTTP requests are failing\n      - alert: HighNumberOfFailedHTTPRequests\n        expr: sum(rate(etcd_http_failed_total{job=\"etcd\"}[5m])) BY (method) / sum(rate(etcd_http_received_total{job=\"etcd\"}[5m]))\n          BY (method) > 0.05\n        for: 5m\n        labels:\n          severity: critical\n        annotations:\n          description: '{{ $value }}% of requests for {{ $labels.method }} failed on etcd\n            instance {{ $labels.instance }}'\n          summary: a high number of HTTP requests are failing\n      - alert: HTTPRequestsSlow\n        expr: histogram_quantile(0.99, rate(etcd_http_successful_duration_seconds_bucket[5m]))\n          > 0.15\n        for: 10m\n        labels:\n          severity: warning\n        annotations:\n          description: on etcd instance {{ $labels.instance }} HTTP requests to {{ $labels.method\n            }} are slow\n          summary: slow HTTP requests\n      - alert: EtcdMemberCommunicationSlow\n        expr: histogram_quantile(0.99, rate(etcd_network_member_round_trip_time_seconds_bucket[5m]))\n          > 0.15\n        for: 10m\n        labels:\n          severity: warning\n        annotations:\n          description: etcd instance {{ $labels.instance }} member communication with\n            {{ $labels.To }} is slow\n          summary: etcd member communication is slow\n      - alert: HighNumberOfFailedProposals\n        expr: increase(etcd_server_proposals_failed_total{job=\"etcd\"}[1h]) > 5\n        labels:\n          severity: warning\n        annotations:\n          description: etcd instance {{ $labels.instance }} has seen {{ $value }} proposal\n            failures within the last hour\n          summary: a high number of proposals within the etcd cluster are failing\n      - alert: HighFsyncDurations\n        expr: histogram_quantile(0.99, rate(etcd_disk_wal_fsync_duration_seconds_bucket[5m]))\n          > 0.5\n        for: 10m\n        labels:\n          severity: warning\n        annotations:\n          description: etcd instance {{ $labels.instance }} fync durations are high\n          summary: high fsync durations\n      - alert: HighCommitDurations\n        expr: histogram_quantile(0.99, rate(etcd_disk_backend_commit_duration_seconds_bucket[5m]))\n          > 0.25\n        for: 10m\n        labels:\n          severity: warning\n        annotations:\n          description: etcd instance {{ $labels.instance }} commit durations are high\n          summary: high commit durations\n  general.rules.yaml: |+\n    groups:\n    - name: ./general.rules\n      rules:\n      - alert: TargetDown\n        expr: 100 * (count(up == 0) BY (job) / count(up) BY (job)) > 10\n        for: 10m\n        labels:\n          severity: warning\n        annotations:\n          description: '{{ $value }}% or more of {{ $labels.job }} targets are down.'\n          summary: Targets are down\n      - alert: DeadMansSwitch\n        expr: vector(1)\n        labels:\n          severity: none\n        annotations:\n          description: This is a DeadMansSwitch meant to ensure that the entire Alerting\n            pipeline is functional.\n          summary: Alerting DeadMansSwitch\n      - alert: TooManyOpenFileDescriptors\n        expr: 100 * (process_open_fds / process_max_fds) > 95\n        for: 10m\n        labels:\n          severity: critical\n        annotations:\n          description: '{{ $labels.job }}: {{ $labels.namespace }}/{{ $labels.pod }} ({{\n            $labels.instance }}) is using {{ $value }}% of the available file/socket descriptors.'\n          summary: too many open file descriptors\n      - record: instance:fd_utilization\n        expr: process_open_fds / process_max_fds\n      - alert: FdExhaustionClose\n        expr: predict_linear(instance:fd_utilization[1h], 3600 * 4) > 1\n        for: 10m\n        labels:\n          severity: warning\n        annotations:\n          description: '{{ $labels.job }}: {{ $labels.namespace }}/{{ $labels.pod }} ({{\n            $labels.instance }}) instance will exhaust in file/socket descriptors soon'\n          summary: file descriptors soon exhausted\n      - alert: FdExhaustionClose\n        expr: predict_linear(instance:fd_utilization[10m], 3600) > 1\n        for: 10m\n        labels:\n          severity: critical\n        annotations:\n          description: '{{ $labels.job }}: {{ $labels.namespace }}/{{ $labels.pod }} ({{\n            $labels.instance }}) instance will exhaust in file/socket descriptors soon'\n          summary: file descriptors soon exhausted\n  kube-apiserver.rules.yaml: |+\n    groups:\n    - name: ./kube-apiserver.rules\n      rules:\n      - alert: K8SApiserverDown\n        expr: absent(up{job=\"apiserver\"} == 1)\n        for: 5m\n        labels:\n          severity: critical\n        annotations:\n          description: Prometheus failed to scrape API server(s), or all API servers have\n            disappeared from service discovery.\n          summary: API server unreachable\n      - alert: K8SApiServerLatency\n        expr: histogram_quantile(0.99, sum(apiserver_request_latencies_bucket{subresource!=\"log\",verb!~\"^(?:CONNECT|WATCHLIST|WATCH|PROXY)$\"})\n          WITHOUT (instance, resource)) / 1e+06 > 1\n        for: 10m\n        labels:\n          severity: warning\n        annotations:\n          description: 99th percentile Latency for {{ $labels.verb }} requests to the\n            kube-apiserver is higher than 1s.\n          summary: Kubernetes apiserver latency is high\n  kube-controller-manager.rules.yaml: |+\n    groups:\n    - name: ./kube-controller-manager.rules\n      rules:\n      - alert: K8SControllerManagerDown\n        expr: absent(up{job=\"kube-controller-manager\"} == 1)\n        for: 5m\n        labels:\n          severity: critical\n        annotations:\n          description: There is no running K8S controller manager. Deployments and replication\n            controllers are not making progress.\n          runbook: https://coreos.com/tectonic/docs/latest/troubleshooting/controller-recovery.html#recovering-a-controller-manager\n          summary: Controller manager is down\n  kube-scheduler.rules.yaml: |+\n    groups:\n    - name: ./kube-scheduler.rules\n      rules:\n      - alert: K8SSchedulerDown\n        expr: absent(up{job=\"kube-scheduler\"} == 1)\n        for: 5m\n        labels:\n          severity: critical\n        annotations:\n          description: There is no running K8S scheduler. New pods are not being assigned\n            to nodes.\n          runbook: https://coreos.com/tectonic/docs/latest/troubleshooting/controller-recovery.html#recovering-a-scheduler\n          summary: Scheduler is down\n  kubelet.rules.yaml: |+\n    groups:\n    - name: ./kubelet.rules\n      rules:\n      - alert: K8SNodeNotReady\n        expr: kube_node_status_condition{condition=\"Ready\",status=\"true\"} == 0\n        for: 1h\n        labels:\n          severity: warning\n        annotations:\n          description: The Kubelet on {{ $labels.node }} has not checked in with the API,\n            or has set itself to NotReady, for more than an hour\n          summary: Node status is NotReady\n      - alert: K8SManyNodesNotReady\n        expr: count(kube_node_status_condition{condition=\"Ready\",status=\"true\"} == 0)\n          > 1 and (count(kube_node_status_condition{condition=\"Ready\",status=\"true\"} ==\n          0) / count(kube_node_status_condition{condition=\"Ready\",status=\"true\"})) > 0.2\n        for: 1m\n        labels:\n          severity: critical\n        annotations:\n          description: '{{ $value }} Kubernetes nodes (more than 10% are in the NotReady\n            state).'\n          summary: Many Kubernetes nodes are Not Ready\n      - alert: K8SKubeletDown\n        expr: count(up{job=\"kubelet\"} == 0) / count(up{job=\"kubelet\"}) > 0.03\n        for: 1h\n        labels:\n          severity: warning\n        annotations:\n          description: Prometheus failed to scrape {{ $value }}% of kubelets.\n          summary: Many Kubelets cannot be scraped\n      - alert: K8SKubeletDown\n        expr: absent(up{job=\"kubelet\"} == 1) or count(up{job=\"kubelet\"} == 0) / count(up{job=\"kubelet\"})\n          > 0.1\n        for: 1h\n        labels:\n          severity: critical\n        annotations:\n          description: Prometheus failed to scrape {{ $value }}% of kubelets, or all Kubelets\n            have disappeared from service discovery.\n          summary: Many Kubelets cannot be scraped\n      - alert: K8SKubeletTooManyPods\n        expr: kubelet_running_pod_count > 100\n        labels:\n          severity: warning\n        annotations:\n          description: Kubelet {{$labels.instance}} is running {{$value}} pods, close\n            to the limit of 110\n          summary: Kubelet is close to pod limit\n  kubernetes.rules.yaml: |+\n    groups:\n    - name: ./kubernetes.rules\n      rules:\n      - record: cluster_namespace_controller_pod_container:spec_memory_limit_bytes\n        expr: sum(label_replace(container_spec_memory_limit_bytes{container_name!=\"\"},\n          \"controller\", \"$1\", \"pod_name\", \"^(.*)-[a-z0-9]+\")) BY (cluster, namespace,\n          controller, pod_name, container_name)\n      - record: cluster_namespace_controller_pod_container:spec_cpu_shares\n        expr: sum(label_replace(container_spec_cpu_shares{container_name!=\"\"}, \"controller\",\n          \"$1\", \"pod_name\", \"^(.*)-[a-z0-9]+\")) BY (cluster, namespace, controller, pod_name,\n          container_name)\n      - record: cluster_namespace_controller_pod_container:cpu_usage:rate\n        expr: sum(label_replace(irate(container_cpu_usage_seconds_total{container_name!=\"\"}[5m]),\n          \"controller\", \"$1\", \"pod_name\", \"^(.*)-[a-z0-9]+\")) BY (cluster, namespace,\n          controller, pod_name, container_name)\n      - record: cluster_namespace_controller_pod_container:memory_usage:bytes\n        expr: sum(label_replace(container_memory_usage_bytes{container_name!=\"\"}, \"controller\",\n          \"$1\", \"pod_name\", \"^(.*)-[a-z0-9]+\")) BY (cluster, namespace, controller, pod_name,\n          container_name)\n      - record: cluster_namespace_controller_pod_container:memory_working_set:bytes\n        expr: sum(label_replace(container_memory_working_set_bytes{container_name!=\"\"},\n          \"controller\", \"$1\", \"pod_name\", \"^(.*)-[a-z0-9]+\")) BY (cluster, namespace,\n          controller, pod_name, container_name)\n      - record: cluster_namespace_controller_pod_container:memory_rss:bytes\n        expr: sum(label_replace(container_memory_rss{container_name!=\"\"}, \"controller\",\n          \"$1\", \"pod_name\", \"^(.*)-[a-z0-9]+\")) BY (cluster, namespace, controller, pod_name,\n          container_name)\n      - record: cluster_namespace_controller_pod_container:memory_cache:bytes\n        expr: sum(label_replace(container_memory_cache{container_name!=\"\"}, \"controller\",\n          \"$1\", \"pod_name\", \"^(.*)-[a-z0-9]+\")) BY (cluster, namespace, controller, pod_name,\n          container_name)\n      - record: cluster_namespace_controller_pod_container:disk_usage:bytes\n        expr: sum(label_replace(container_disk_usage_bytes{container_name!=\"\"}, \"controller\",\n          \"$1\", \"pod_name\", \"^(.*)-[a-z0-9]+\")) BY (cluster, namespace, controller, pod_name,\n          container_name)\n      - record: cluster_namespace_controller_pod_container:memory_pagefaults:rate\n        expr: sum(label_replace(irate(container_memory_failures_total{container_name!=\"\"}[5m]),\n          \"controller\", \"$1\", \"pod_name\", \"^(.*)-[a-z0-9]+\")) BY (cluster, namespace,\n          controller, pod_name, container_name, scope, type)\n      - record: cluster_namespace_controller_pod_container:memory_oom:rate\n        expr: sum(label_replace(irate(container_memory_failcnt{container_name!=\"\"}[5m]),\n          \"controller\", \"$1\", \"pod_name\", \"^(.*)-[a-z0-9]+\")) BY (cluster, namespace,\n          controller, pod_name, container_name, scope, type)\n      - record: cluster:memory_allocation:percent\n        expr: 100 * sum(container_spec_memory_limit_bytes{pod_name!=\"\"}) BY (cluster)\n          / sum(machine_memory_bytes) BY (cluster)\n      - record: cluster:memory_used:percent\n        expr: 100 * sum(container_memory_usage_bytes{pod_name!=\"\"}) BY (cluster) / sum(machine_memory_bytes)\n          BY (cluster)\n      - record: cluster:cpu_allocation:percent\n        expr: 100 * sum(container_spec_cpu_shares{pod_name!=\"\"}) BY (cluster) / sum(container_spec_cpu_shares{id=\"/\"}\n          * ON(cluster, instance) machine_cpu_cores) BY (cluster)\n      - record: cluster:node_cpu_use:percent\n        expr: 100 * sum(rate(node_cpu{mode!=\"idle\"}[5m])) BY (cluster) / sum(machine_cpu_cores)\n          BY (cluster)\n      - record: cluster_resource_verb:apiserver_latency:quantile_seconds\n        expr: histogram_quantile(0.99, sum(apiserver_request_latencies_bucket) BY (le,\n          cluster, job, resource, verb)) / 1e+06\n        labels:\n          quantile: \"0.99\"\n      - record: cluster_resource_verb:apiserver_latency:quantile_seconds\n        expr: histogram_quantile(0.9, sum(apiserver_request_latencies_bucket) BY (le,\n          cluster, job, resource, verb)) / 1e+06\n        labels:\n          quantile: \"0.9\"\n      - record: cluster_resource_verb:apiserver_latency:quantile_seconds\n        expr: histogram_quantile(0.5, sum(apiserver_request_latencies_bucket) BY (le,\n          cluster, job, resource, verb)) / 1e+06\n        labels:\n          quantile: \"0.5\"\n      - record: cluster:scheduler_e2e_scheduling_latency:quantile_seconds\n        expr: histogram_quantile(0.99, sum(scheduler_e2e_scheduling_latency_microseconds_bucket)\n          BY (le, cluster)) / 1e+06\n        labels:\n          quantile: \"0.99\"\n      - record: cluster:scheduler_e2e_scheduling_latency:quantile_seconds\n        expr: histogram_quantile(0.9, sum(scheduler_e2e_scheduling_latency_microseconds_bucket)\n          BY (le, cluster)) / 1e+06\n        labels:\n          quantile: \"0.9\"\n      - record: cluster:scheduler_e2e_scheduling_latency:quantile_seconds\n        expr: histogram_quantile(0.5, sum(scheduler_e2e_scheduling_latency_microseconds_bucket)\n          BY (le, cluster)) / 1e+06\n        labels:\n          quantile: \"0.5\"\n      - record: cluster:scheduler_scheduling_algorithm_latency:quantile_seconds\n        expr: histogram_quantile(0.99, sum(scheduler_scheduling_algorithm_latency_microseconds_bucket)\n          BY (le, cluster)) / 1e+06\n        labels:\n          quantile: \"0.99\"\n      - record: cluster:scheduler_scheduling_algorithm_latency:quantile_seconds\n        expr: histogram_quantile(0.9, sum(scheduler_scheduling_algorithm_latency_microseconds_bucket)\n          BY (le, cluster)) / 1e+06\n        labels:\n          quantile: \"0.9\"\n      - record: cluster:scheduler_scheduling_algorithm_latency:quantile_seconds\n        expr: histogram_quantile(0.5, sum(scheduler_scheduling_algorithm_latency_microseconds_bucket)\n          BY (le, cluster)) / 1e+06\n        labels:\n          quantile: \"0.5\"\n      - record: cluster:scheduler_binding_latency:quantile_seconds\n        expr: histogram_quantile(0.99, sum(scheduler_binding_latency_microseconds_bucket)\n          BY (le, cluster)) / 1e+06\n        labels:\n          quantile: \"0.99\"\n      - record: cluster:scheduler_binding_latency:quantile_seconds\n        expr: histogram_quantile(0.9, sum(scheduler_binding_latency_microseconds_bucket)\n          BY (le, cluster)) / 1e+06\n        labels:\n          quantile: \"0.9\"\n      - record: cluster:scheduler_binding_latency:quantile_seconds\n        expr: histogram_quantile(0.5, sum(scheduler_binding_latency_microseconds_bucket)\n          BY (le, cluster)) / 1e+06\n        labels:\n          quantile: \"0.5\"\n  node.rules.yaml: |+\n    groups:\n    - name: ./node.rules\n      rules:\n      - alert: NodeExporterDown\n        expr: absent(up{job=\"node-exporter\"} == 1)\n        for: 10m\n        labels:\n          severity: warning\n        annotations:\n          description: Prometheus could not scrape a node-exporter for more than 10m,\n            or node-exporters have disappeared from discovery.\n          summary: node-exporter cannot be scraped\n      - alert: K8SNodeOutOfDisk\n        expr: kube_node_status_condition{condition=\"OutOfDisk\",status=\"true\"} == 1\n        labels:\n          service: k8s\n          severity: critical\n        annotations:\n          description: '{{ $labels.node }} has run out of disk space.'\n          summary: Node ran out of disk space.\n      - alert: K8SNodeMemoryPressure\n        expr: kube_node_status_condition{condition=\"MemoryPressure\",status=\"true\"} ==\n          1\n        labels:\n          service: k8s\n          severity: warning\n        annotations:\n          description: '{{ $labels.node }} is under memory pressure.'\n          summary: Node is under memory pressure.\n      - alert: K8SNodeDiskPressure\n        expr: kube_node_status_condition{condition=\"DiskPressure\",status=\"true\"} == 1\n        labels:\n          service: k8s\n          severity: warning\n        annotations:\n          description: '{{ $labels.node }} is under disk pressure.'\n          summary: Node is under disk pressure.\n  prometheus.rules.yaml: |+\n    groups:\n    - name: ./prometheus.rules\n      rules:\n      - alert: FailedReload\n        expr: prometheus_config_last_reload_successful == 0\n        for: 10m\n        labels:\n          severity: warning\n        annotations:\n          description: Reloading Prometheus' configuration has failed for {{ $labels.namespace\n            }}/{{ $labels.pod}}.\n          summary: Prometheus configuration reload has failed\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-service-account.yaml",
    "content": "apiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: prometheus-k8s\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-service-monitor-alertmanager.yaml",
    "content": "apiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n  name: alertmanager\n  labels:\n    k8s-app: alertmanager\nspec:\n  selector:\n    matchLabels:\n      alertmanager: main\n  namespaceSelector:\n    matchNames:\n    - monitoring\n  endpoints:\n  - port: web\n    interval: 30s\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-service-monitor-apiserver.yaml",
    "content": "apiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n  name: kube-apiserver\n  labels:\n    k8s-app: apiserver\nspec:\n  jobLabel: component\n  selector:\n    matchLabels:\n      component: apiserver\n      provider: kubernetes\n  namespaceSelector:\n    matchNames:\n    - default\n  endpoints:\n  - port: https\n    interval: 30s\n    scheme: https\n    tlsConfig:\n      caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt\n      serverName: kubernetes\n    bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-service-monitor-kube-controller-manager.yaml",
    "content": "apiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n  name: kube-controller-manager\n  labels:\n    k8s-app: kube-controller-manager\nspec:\n  jobLabel: k8s-app\n  endpoints:\n  - port: http-metrics\n    interval: 30s\n  selector:\n    matchLabels:\n      k8s-app: kube-controller-manager\n  namespaceSelector:\n    matchNames:\n    - kube-system\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-service-monitor-kube-scheduler.yaml",
    "content": "apiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n  name: kube-scheduler\n  labels:\n    k8s-app: kube-scheduler\nspec:\n  jobLabel: k8s-app\n  endpoints:\n  - port: http-metrics\n    interval: 30s\n  selector:\n    matchLabels:\n      k8s-app: kube-scheduler\n  namespaceSelector:\n    matchNames:\n    - kube-system\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-service-monitor-kube-state-metrics.yaml",
    "content": "apiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n  name: kube-state-metrics\n  labels:\n    k8s-app: kube-state-metrics\nspec:\n  jobLabel: k8s-app\n  selector:\n    matchLabels:\n      k8s-app: kube-state-metrics\n  namespaceSelector:\n    matchNames:\n    - monitoring\n  endpoints:\n  - port: http-metrics\n    interval: 30s\n    honorLabels: true\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-service-monitor-kubelet.yaml",
    "content": "apiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n  name: kubelet\n  labels:\n    k8s-app: kubelet\nspec:\n  jobLabel: k8s-app\n  endpoints:\n  - port: http-metrics\n    interval: 30s\n  - port: cadvisor\n    interval: 30s\n    honorLabels: true\n  selector:\n    matchLabels:\n      k8s-app: kubelet\n  namespaceSelector:\n    matchNames:\n    - kube-system\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-service-monitor-node-exporter.yaml",
    "content": "apiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n  name: node-exporter\n  labels:\n    k8s-app: node-exporter\nspec:\n  jobLabel: k8s-app\n  selector:\n    matchLabels:\n      k8s-app: node-exporter\n  namespaceSelector:\n    matchNames:\n    - monitoring\n  endpoints:\n  - port: http-metrics\n    interval: 30s\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-service-monitor-prometheus-operator.yaml",
    "content": "apiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n  name: prometheus-operator\n  labels:\n    k8s-app: prometheus-operator\nspec:\n  endpoints:\n  - port: http\n  selector:\n    matchLabels:\n      k8s-app: prometheus-operator\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-service-monitor-prometheus.yaml",
    "content": "apiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n  name: prometheus\n  labels:\n    k8s-app: prometheus\nspec:\n  selector:\n    matchLabels:\n      prometheus: k8s\n  namespaceSelector:\n    matchNames:\n    - monitoring\n  endpoints:\n  - port: web\n    interval: 30s\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-service-monitor-rook.yaml",
    "content": "apiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n  name: rook-api\n  labels:\n    k8s-app: rook\nspec:\n  selector:\n    matchLabels:\n      app: rook-api\n      rook_cluster: rook\n  namespaceSelector:\n    matchNames:\n    - rook\n  endpoints:\n  - port: rook-api\n    path: /metrics\n    interval: 60s\n    scrapeTimeout: 30s\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-service-monitor-traefik.yaml",
    "content": "apiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n  name: traefik\n  labels:\n    k8s-app: traefik\nspec:\n  endpoints:\n  - port: web\n    path: /metrics\n    interval: 5s\n  selector:\n    matchNames:\n    - traefik-console\n  namespaceSelector:\n    matchNames:\n    - kube-system\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s-service.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  labels:\n    prometheus: k8s\n  name: prometheus-k8s\nspec:\n  ports:\n  - name: web\n    port: 9090\n    protocol: TCP\n  selector:\n    prometheus: k8s\n"
  },
  {
    "path": "manifests/prometheus/prometheus-k8s.yaml",
    "content": "apiVersion: monitoring.coreos.com/v1\nkind: Prometheus\nmetadata:\n  name: k8s\n  labels:\n    prometheus: k8s\nspec:\n  replicas: 1\n  version: v2.0.0\n  serviceAccountName: prometheus-k8s\n  serviceMonitorSelector:\n    matchExpressions:\n    - {key: k8s-app, operator: Exists}\n  ruleSelector:\n    matchLabels:\n      role: prometheus-rulefiles\n      prometheus: k8s\n  resources:\n    requests:\n      # 2Gi is default, but won't schedule if you don't have a node with >2Gi\n      # memory. Modify based on your target and time-series count for\n      # production use. This value is mainly meant for demonstration/testing\n      # purposes.\n      memory: 400Mi\n  alerting:\n    alertmanagers:\n    - namespace: monitoring\n      name: alertmanager-main\n      port: web\n"
  },
  {
    "path": "manifests/prometheus-operator/prometheus-operator-cluster-role-binding.yaml",
    "content": "apiVersion: rbac.authorization.k8s.io/v1beta1\nkind: ClusterRoleBinding\nmetadata:\n  name: prometheus-operator\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: prometheus-operator\nsubjects:\n- kind: ServiceAccount\n  name: prometheus-operator\n  namespace: monitoring\n"
  },
  {
    "path": "manifests/prometheus-operator/prometheus-operator-cluster-role.yaml",
    "content": "apiVersion: rbac.authorization.k8s.io/v1beta1\nkind: ClusterRole\nmetadata:\n  name: prometheus-operator\nrules:\n- apiGroups:\n  - extensions\n  resources:\n  - thirdpartyresources\n  verbs:\n  - \"*\"\n- apiGroups:\n  - apiextensions.k8s.io\n  resources:\n  - customresourcedefinitions\n  verbs:\n  - \"*\"\n- apiGroups:\n  - monitoring.coreos.com\n  resources:\n  - alertmanagers\n  - prometheuses\n  - servicemonitors\n  verbs:\n  - \"*\"\n- apiGroups:\n  - apps\n  resources:\n  - statefulsets\n  verbs: [\"*\"]\n- apiGroups: [\"\"]\n  resources:\n  - configmaps\n  - secrets\n  verbs: [\"*\"]\n- apiGroups: [\"\"]\n  resources:\n  - pods\n  verbs: [\"list\", \"delete\"]\n- apiGroups: [\"\"]\n  resources:\n  - services\n  - endpoints\n  verbs: [\"get\", \"create\", \"update\"]\n- apiGroups: [\"\"]\n  resources:\n  - nodes\n  verbs: [\"list\", \"watch\"]\n- apiGroups: [\"\"]\n  resources:\n  - namespaces\n  verbs: [\"list\"]\n"
  },
  {
    "path": "manifests/prometheus-operator/prometheus-operator-service-account.yaml",
    "content": "apiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: prometheus-operator\n"
  },
  {
    "path": "manifests/prometheus-operator/prometheus-operator-service.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: prometheus-operator\n  labels:\n    k8s-app: prometheus-operator\nspec:\n  type: ClusterIP\n  ports:\n  - name: http\n    port: 8080\n    targetPort: http\n    protocol: TCP\n  selector:\n    k8s-app: prometheus-operator\n"
  },
  {
    "path": "manifests/prometheus-operator/prometheus-operator.yaml",
    "content": "apiVersion: extensions/v1beta1\nkind: Deployment\nmetadata:\n  labels:\n    k8s-app: prometheus-operator\n  name: prometheus-operator\nspec:\n  replicas: 1\n  template:\n    metadata:\n      labels:\n        k8s-app: prometheus-operator\n    spec:\n      containers:\n      - args:\n        - --kubelet-service=kube-system/kubelet\n        - --config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1\n        image: quay.io/coreos/prometheus-operator:v0.17.0\n        name: prometheus-operator\n        ports:\n        - containerPort: 8080\n          name: http\n        resources:\n          limits:\n            cpu: 200m\n            memory: 100Mi\n          requests:\n            cpu: 100m\n            memory: 50Mi\n      serviceAccountName: prometheus-operator\n"
  },
  {
    "path": "manifests/rook/rook-cluster.yaml",
    "content": "apiVersion: v1\nkind: Namespace\nmetadata:\n  name: rook\n---\napiVersion: rook.io/v1alpha1\nkind: Cluster\nmetadata:\n  name: rook\n  namespace: rook\nspec:\n  versionTag: master\n  # The path on the host where configuration files will be persisted. If not specified, a kubernetes emptyDir will be created (not recommended).\n  # Important: if you reinstall the cluster, make sure you delete this directory from each host or else the mons will fail to start on the new cluster.\n  dataDirHostPath: /var/lib/rook\n  # toggle to use hostNetwork\n  hostNetwork: false\n  # set the amount of mons to be started\n  monCount: 1\n# To control where various services will be scheduled by kubernetes, use the placement configuration sections below.\n# The example under 'all' would have all services scheduled on kubernetes nodes labeled with 'role=storage' and\n# tolerate taints with a key of 'storage-node'.\n#  placement:\n#    all:\n#      nodeAffinity:\n#        requiredDuringSchedulingIgnoredDuringExecution:\n#          nodeSelectorTerms:\n#          - matchExpressions:\n#            - key: role\n#              operator: In\n#              values:\n#              - storage-node\n#      podAffinity:\n#      podAntiAffinity:\n#      tolerations:\n#      - key: storage-node\n#        operator: Exists\n#    api:\n#      nodeAffinity:\n#      podAffinity:\n#      podAntiAffinity:\n#      tolerations:\n#    mgr:\n#      nodeAffinity:\n#      podAffinity:\n#      podAntiAffinity:\n#      tolerations:\n#    mon:\n#      nodeAffinity:\n#      podAffinity:\n#      podAntiAffinity:\n#      tolerations:\n#    osd:\n#      nodeAffinity:\n#      podAffinity:\n#      podAntiAffinity:\n#      tolerations:\n  storage:\n    useAllNodes: true\n    useAllDevices: false\n    deviceFilter: ^sd[^a]\n    metadataDevice:\n    location:\n    storeConfig:\n      storeType: bluestore\n      databaseSizeMB: 1024 # this value can be removed for environments with normal sized disks (100 GB or larger)\n      journalSizeMB: 1024  # this value can be removed for environments with normal sized disks (20 GB or larger)\n# Individual nodes and their config can be specified as well, but 'useAllNodes' above must be set to false. Then, only the named\n# nodes below will be used as storage resources.  Each node's 'name' field should match their 'kubernetes.io/hostname' label.\n#    nodes:\n#    - name: \"172.17.4.101\"\n#      directories:         # specific directores to use for storage can be specified for each node\n#      - path: \"/rook/storage-dir\"\n#    - name: \"172.17.4.201\"\n#      devices:             # specific devices to use for storage can be specified for each node\n#      - name: \"sdb\"\n#      - name: \"sdc\"\n#      storeConfig:         # configuration can be specified at the node level which overrides the cluster level config\n#        storeType: bluestore\n#    - name: \"172.17.4.301\"\n#      deviceFilter: \"^sd.\"\n"
  },
  {
    "path": "manifests/rook/rook-operator.yaml",
    "content": "---\napiVersion: apiextensions.k8s.io/v1beta1\nkind: CustomResourceDefinition\nmetadata:\n  name: clusters.rook.io\nspec:\n  group: rook.io\n  names:\n    kind: Cluster\n    listKind: ClusterList\n    plural: clusters\n    singular: cluster\n  scope: Namespaced\n  version: v1alpha1\n---\napiVersion: apiextensions.k8s.io/v1beta1\nkind: CustomResourceDefinition\nmetadata:\n  name: filesystems.rook.io\nspec:\n  group: rook.io\n  names:\n    kind: Filesystem\n    listKind: FilesystemList\n    plural: filesystems\n    singular: filesystem\n  scope: Namespaced\n  version: v1alpha1\n---\napiVersion: apiextensions.k8s.io/v1beta1\nkind: CustomResourceDefinition\nmetadata:\n  name: objectstores.rook.io\nspec:\n  group: rook.io\n  names:\n    kind: ObjectStore\n    listKind: ObjectStoreList\n    plural: objectstores\n    singular: objectstore\n  scope: Namespaced\n  version: v1alpha1\n---\napiVersion: apiextensions.k8s.io/v1beta1\nkind: CustomResourceDefinition\nmetadata:\n  name: pools.rook.io\nspec:\n  group: rook.io\n  names:\n    kind: Pool\n    listKind: PoolList\n    plural: pools\n    singular: pool\n  scope: Namespaced\n  version: v1alpha1\n---\napiVersion: apiextensions.k8s.io/v1beta1\nkind: CustomResourceDefinition\nmetadata:\n  name: volumeattachments.rook.io\nspec:\n  group: rook.io\n  names:\n    kind: VolumeAttachment\n    listKind: VolumeAttachmentList\n    plural: volumeattachments\n    singular: volumeattachment\n  scope: Namespaced\n  version: v1alpha1\n---\napiVersion: rbac.authorization.k8s.io/v1beta1\nkind: ClusterRole\nmetadata:\n  name: rook-operator\nrules:\n- apiGroups:\n  - \"\"\n  resources:\n  - namespaces\n  - serviceaccounts\n  - secrets\n  - pods\n  - services\n  - nodes\n  - nodes/proxy\n  - configmaps\n  - events\n  - persistentvolumes\n  - persistentvolumeclaims\n  verbs:\n  - get\n  - list\n  - watch\n  - patch\n  - create\n  - update\n  - delete\n- apiGroups:\n  - extensions\n  resources:\n  - deployments\n  - daemonsets\n  - replicasets\n  verbs:\n  - get\n  - list\n  - watch\n  - create\n  - update\n  - delete\n- apiGroups:\n  - rbac.authorization.k8s.io\n  resources:\n  - clusterroles\n  - clusterrolebindings\n  - roles\n  - rolebindings\n  verbs:\n  - get\n  - list\n  - watch\n  - create\n  - update\n  - delete\n- apiGroups:\n  - storage.k8s.io\n  resources:\n  - storageclasses\n  verbs:\n  - get\n  - list\n  - watch\n  - delete\n- apiGroups:\n  - rook.io\n  resources:\n  - \"*\"\n  verbs:\n  - \"*\"\n---\napiVersion: v1\nkind: Namespace\nmetadata:\n  name: rook-system\n---\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: rook-operator\n  namespace: rook-system\n---\nkind: ClusterRoleBinding\napiVersion: rbac.authorization.k8s.io/v1beta1\nmetadata:\n  name: rook-operator\n  namespace: rook-system\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: rook-operator\nsubjects:\n- kind: ServiceAccount\n  name: rook-operator\n  namespace: rook-system\n---\napiVersion: apps/v1beta1\nkind: Deployment\nmetadata:\n  name: rook-operator\n  namespace: rook-system\nspec:\n  replicas: 1\n  template:\n    metadata:\n      labels:\n        app: rook-operator\n    spec:\n      serviceAccountName: rook-operator\n      containers:\n      - name: rook-operator\n        image: rook/rook:v0.7.1\n        args: [\"operator\"]\n        env:\n        # To disable RBAC, uncomment the following:\n        # - name: RBAC_ENABLED\n        #  value: \"false\"\n        # Rook Agent toleration. Will tolerate all taints with all keys.\n        # Choose between NoSchedule, PreferNoSchedule and NoExecute:\n        # - name: AGENT_TOLERATION\n        #  value: \"NoSchedule\"\n        # (Optional) Rook Agent toleration key. Set this to the key of the taint you want to tolerate\n        # - name: AGENT_TOLERATION_KEY\n        #  value: \"<KeyOfTheTaintToTolerate>\"\n        # Set the path where the Rook agent can find the flex volumes\n        # - name: FLEXVOLUME_DIR_PATH\n        #  value: \"<PathToFlexVolumes>\"\n        # The interval to check if every mon is in the quorum.\n        - name: FLEXVOLUME_DIR_PATH\n          value: \"/var/lib/kubelet/volumeplugins\"\n        - name: ROOK_MON_HEALTHCHECK_INTERVAL\n          value: \"45s\"\n        # The duration to wait before trying to failover or remove/replace the\n        # current mon with a new mon (useful for compensating flapping network).\n        - name: ROOK_MON_OUT_TIMEOUT\n          value: \"300s\"\n        - name: NODE_NAME\n          valueFrom:\n            fieldRef:\n              fieldPath: spec.nodeName\n        - name: POD_NAME\n          valueFrom:\n            fieldRef:\n              fieldPath: metadata.name\n        - name: POD_NAMESPACE\n          valueFrom:\n            fieldRef:\n              fieldPath: metadata.namespace\n"
  },
  {
    "path": "manifests/rook/rook-storageclass.yaml",
    "content": "apiVersion: rook.io/v1alpha1\nkind: Pool\nmetadata:\n  name: replicapool\n  namespace: rook\nspec:\n  replicated:\n    size: 1\n  # For an erasure-coded pool, comment out the replication size above and uncomment the following settings.\n  # Make sure you have enough OSDs to support the replica size or erasure code chunks.\n  #erasureCoded:\n  #  dataChunks: 2\n  #  codingChunks: 1\n---\napiVersion: storage.k8s.io/v1\nkind: StorageClass\nmetadata:\n   name: rook-block\n   annotations:\n     storageclass.kubernetes.io/is-default-class: \"true\"\nprovisioner: rook.io/block\nparameters:\n  pool: replicapool\n  # Specify the Rook cluster from which to create volumes.\n  # If not specified, it will use `rook` as the name of the cluster.\n  # This is also the namespace where the cluster will be\n  clusterName: rook\n  # Specify the filesystem type of the volume. If not specified, it will use `ext4`.\n  # fstype: ext4\n"
  },
  {
    "path": "manifests/traefik.yaml",
    "content": "---\nkind: ClusterRole\napiVersion: rbac.authorization.k8s.io/v1beta1\nmetadata:\n  name: traefik-ingress-controller\nrules:\n  - apiGroups:\n      - \"\"\n    resources:\n      - services\n      - endpoints\n      - secrets\n    verbs:\n      - get\n      - list\n      - watch\n  - apiGroups:\n      - extensions\n    resources:\n      - ingresses\n    verbs:\n      - get\n      - list\n      - watch\n---\nkind: ClusterRoleBinding\napiVersion: rbac.authorization.k8s.io/v1beta1\nmetadata:\n  name: traefik-ingress-controller\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: ClusterRole\n  name: traefik-ingress-controller\nsubjects:\n- kind: ServiceAccount\n  name: traefik-ingress-controller\n  namespace: kube-system\n---\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: traefik-ingress-controller\n  namespace: kube-system\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: traefik\n  namespace: kube-system\n  labels:\n    k8s-app: traefik-ingress-lb\nspec:\n  selector:\n    k8s-app: traefik-ingress-lb\n  ports:\n    - port: 80\n      name: http\n    - port: 443\n      name: https\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: traefik-console\n  namespace: kube-system\n  labels:\n    k8s-app: traefik-ingress-lb\nspec:\n  selector:\n    k8s-app: traefik-ingress-lb\n  ports:\n    - port: 8080\n      name: web\n---\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: traefik-conf\n  namespace: kube-system\ndata:\n  traefik.toml: |\n    # traefik.toml\n    defaultEntryPoints = [\"http\",\"https\"]\n    InsecureSkipVerify = true\n    [entryPoints]\n      [entryPoints.http]\n      address = \":80\"\n      [entryPoints.http.redirect]\n      entryPoint = \"https\"\n      [entryPoints.https]\n      address = \":443\"\n      [entryPoints.https.tls]\n    [acme]\n    email = \"$EMAIL\"\n    storage = \"/acme/acme.json\"\n    entryPoint = \"https\"\n    onDemand = true\n    onHostRule = true\n    caServer = \"https://acme-v01.api.letsencrypt.org/directory\"\n    [acme.httpChallenge]\n      entryPoint = \"http\"\n    [[acme.domains]]\n      main = \"${DOMAIN}\"\n    [web]\n      address = \":8080\"\n      [web.metrics.prometheus]\n        Buckets=[0.1,0.3,1.2,5.0]\n---\napiVersion: extensions/v1beta1\nkind: DaemonSet\nmetadata:\n  name: traefik-ingress-controller\n  namespace: kube-system\n  labels:\n    k8s-app: traefik-ingress-lb\nspec:\n  revisionHistoryLimit: 0\n  template:\n    metadata:\n      labels:\n        k8s-app: traefik-ingress-lb\n        name: traefik-ingress-lb\n    spec:\n      terminationGracePeriodSeconds: 60\n      volumes:\n        - name: config\n          configMap:\n            name: traefik-conf\n        - name: acme\n          hostPath:\n            path: /etc/traefik/acme\n      containers:\n        - image: traefik:v1.6.5\n          name: traefik-ingress-lb\n          imagePullPolicy: Always\n          volumeMounts:\n            - mountPath: \"/config\"\n              name: \"config\"\n            - mountPath: \"/acme\"\n              name: \"acme\"\n          ports:\n            - containerPort: 80\n              hostPort: 80\n            - containerPort: 443\n              hostPort: 443\n            - containerPort: 8080\n          args:\n            - --configfile=/config/traefik.toml\n            - --web\n            - --web.metrics.prometheus\n            - --web.metrics.prometheus.buckets=0.1,0.3,1.2,5.0\n            - --kubernetes\n            - --logLevel=DEBUG\n      affinity:\n        nodeAffinity:\n          requiredDuringSchedulingIgnoredDuringExecution:\n            nodeSelectorTerms:\n            - matchExpressions:\n              - key: node-role.kubernetes.io/master\n                operator: In\n                values:\n                -\n      tolerations:\n      - key: CriticalAddonsOnly\n        operator: Exists\n      - key: node-role.kubernetes.io/master\n        operator: Exists\n        effect: NoSchedule\n---\napiVersion: extensions/v1beta1\nkind: Ingress\nmetadata:\n  name: traefik-ingress\n  namespace: kube-system\n  annotations:\n    kubernetes.io/ingress.class: \"traefik\"\n    ingress.kubernetes.io/auth-type: \"basic\"\n    ingress.kubernetes.io/auth-secret: \"kubesecret\"\nspec:\n  rules:\n    - host: traefik.${DOMAIN}\n      http:\n        paths:\n          - backend:\n              serviceName: traefik-console\n              servicePort: web\n"
  }
]