gitlab10.0安装手记

    +
    +exec chpst -e /opt/gitlab/etc/gitlab-workhorse/env -P 
    +  -U git 
    +  -u git 
    +  /opt/gitlab/embedded/bin/gitlab-workhorse 
    +    -listenNetwork tcp 
    +    -listenUmask 127.0.0.1:8181 
    +    -listenAddr /var/opt/gitlab/gitlab-workhorse/socket 
    +    -authBackend http://localhost:8080 
    +    -authSocket /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket 
    +    -documentRoot /opt/gitlab/embedded/service/gitlab-rails/public 
    +    -pprofListenAddr ''
    +    -secretPath /opt/gitlab/embedded/service/gitlab-rails/.gitlab_workhorse_secret 
    +    -config config.toml 
    +
    +# Do not remove this line; it prevents trouble with the trailing backslashes above.
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/gitlab-workhorse/log/run] action create
    - create new file /opt/gitlab/sv/gitlab-workhorse/log/run
    - update content in file /opt/gitlab/sv/gitlab-workhorse/log/run from none to 6ed0e1
    --- /opt/gitlab/sv/gitlab-workhorse/log/run	2018-01-14 04:54:04.738286169 +0800
    +++ /opt/gitlab/sv/gitlab-workhorse/log/.chef-run20180114-17778-pylfxr	2018-01-14 04:54:04.737286169 +0800
    @@ -1 +1,3 @@
    +#!/bin/sh
    +exec svlogd -tt /var/log/gitlab/gitlab-workhorse
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/var/log/gitlab/gitlab-workhorse/config] action create
    - create new file /var/log/gitlab/gitlab-workhorse/config
    - update content in file /var/log/gitlab/gitlab-workhorse/config from none to 623c00
    --- /var/log/gitlab/gitlab-workhorse/config	2018-01-14 04:54:04.746286169 +0800
    +++ /var/log/gitlab/gitlab-workhorse/.chef-config20180114-17778-10ch7mq	2018-01-14 04:54:04.746286169 +0800
    @@ -1 +1,7 @@
    +s209715200
    +n30
    +t86400
    +!gzip
    +
    +
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * ruby_block[reload gitlab-workhorse svlogd configuration] action nothing (skipped due to action :nothing)
  * file[/opt/gitlab/sv/gitlab-workhorse/down] action delete (up to date)
  * link[/opt/gitlab/init/gitlab-workhorse] action create
    - create symlink at /opt/gitlab/init/gitlab-workhorse to /opt/gitlab/embedded/bin/sv
  * link[/opt/gitlab/service/gitlab-workhorse] action create
    - create symlink at /opt/gitlab/service/gitlab-workhorse to /opt/gitlab/sv/gitlab-workhorse
  * ruby_block[supervise_gitlab-workhorse_sleep] action run
    - execute the ruby block supervise_gitlab-workhorse_sleep
  * directory[/opt/gitlab/sv/gitlab-workhorse/supervise] action create
    - change mode from '0700' to '0755'
  * directory[/opt/gitlab/sv/gitlab-workhorse/log/supervise] action create
    - change mode from '0700' to '0755'
  * file[/opt/gitlab/sv/gitlab-workhorse/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/gitlab-workhorse/log/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/gitlab-workhorse/supervise/control] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/gitlab-workhorse/log/supervise/control] action touch (skipped due to only_if)
  * service[gitlab-workhorse] action nothing (skipped due to action :nothing)
  * file[/var/opt/gitlab/gitlab-workhorse/VERSION] action create
    - create new file /var/opt/gitlab/gitlab-workhorse/VERSION
    - update content in file /var/opt/gitlab/gitlab-workhorse/VERSION from none to 304dfb
    --- /var/opt/gitlab/gitlab-workhorse/VERSION	2018-01-14 04:54:07.828286275 +0800
    +++ /var/opt/gitlab/gitlab-workhorse/.chef-VERSION20180114-17778-xk03bx	2018-01-14 04:54:07.828286275 +0800
    @@ -1 +1,2 @@
    +gitlab-workhorse v3.0.0-20171108.113019
  * template[/var/opt/gitlab/gitlab-workhorse/config.toml] action create
    - create new file /var/opt/gitlab/gitlab-workhorse/config.toml
    - update content in file /var/opt/gitlab/gitlab-workhorse/config.toml from none to cb62fe
    --- /var/opt/gitlab/gitlab-workhorse/config.toml	2018-01-14 04:54:07.834286275 +0800
    +++ /var/opt/gitlab/gitlab-workhorse/.chef-config.toml20180114-17778-rnvkya	2018-01-14 04:54:07.834286275 +0800
    @@ -1 +1,4 @@
    +[redis]
    +URL = "unix:/var/opt/gitlab/redis/redis.socket"
    +Password = ""
    - change owner from '' to 'git'
Recipe: gitlab::mailroom_disable
  * link[/opt/gitlab/service/mailroom] action delete (up to date)
  * directory[/opt/gitlab/sv/mailroom] action delete (up to date)
Recipe: gitlab::nginx_disable
  * link[/opt/gitlab/service/nginx] action delete (up to date)
  * directory[/opt/gitlab/sv/nginx] action delete (up to date)
Recipe: gitlab::remote-syslog_disable
  * link[/opt/gitlab/service/remote-syslog] action delete (up to date)
  * directory[/opt/gitlab/sv/remote-syslog] action delete (up to date)
Recipe: gitlab::logrotate
  * directory[/opt/gitlab/sv/logrotate] action create
    - create new directory /opt/gitlab/sv/logrotate
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * directory[/opt/gitlab/sv/logrotate/log] action create
    - create new directory /opt/gitlab/sv/logrotate/log
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * directory[/opt/gitlab/sv/logrotate/log/main] action create
    - create new directory /opt/gitlab/sv/logrotate/log/main
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/logrotate/run] action create
    - create new file /opt/gitlab/sv/logrotate/run
    - update content in file /opt/gitlab/sv/logrotate/run from none to 07f1b6
    --- /opt/gitlab/sv/logrotate/run	2018-01-14 04:54:07.931286278 +0800
    +++ /opt/gitlab/sv/logrotate/.chef-run20180114-17778-sryye6	2018-01-14 04:54:07.931286278 +0800
    @@ -1 +1,11 @@
    +#!/bin/sh
    +exec 2>&1
    +
    +cd /var/opt/gitlab/logrotate
    +
    +exec /opt/gitlab/embedded/bin/chpst -P /usr/bin/env 
    +  dir=/var/opt/gitlab/logrotate 
    +  pre_sleep=600 
    +  post_sleep=3000 
    +  /opt/gitlab/embedded/bin/gitlab-logrotate-wrapper
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/logrotate/log/run] action create
    - create new file /opt/gitlab/sv/logrotate/log/run
    - update content in file /opt/gitlab/sv/logrotate/log/run from none to 94afe6
    --- /opt/gitlab/sv/logrotate/log/run	2018-01-14 04:54:07.964286279 +0800
    +++ /opt/gitlab/sv/logrotate/log/.chef-run20180114-17778-df66p0	2018-01-14 04:54:07.964286279 +0800
    @@ -1 +1,3 @@
    +#!/bin/sh
    +exec svlogd -tt /var/log/gitlab/logrotate
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/var/log/gitlab/logrotate/config] action create
    - create new file /var/log/gitlab/logrotate/config
    - update content in file /var/log/gitlab/logrotate/config from none to 623c00
    --- /var/log/gitlab/logrotate/config	2018-01-14 04:54:07.994286280 +0800
    +++ /var/log/gitlab/logrotate/.chef-config20180114-17778-7dev73	2018-01-14 04:54:07.994286280 +0800
    @@ -1 +1,7 @@
    +s209715200
    +n30
    +t86400
    +!gzip
    +
    +
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * ruby_block[reload logrotate svlogd configuration] action nothing (skipped due to action :nothing)
  * file[/opt/gitlab/sv/logrotate/down] action delete (up to date)
  * directory[/opt/gitlab/sv/logrotate/control] action create
    - create new directory /opt/gitlab/sv/logrotate/control
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/logrotate/control/t] action create
    - create new file /opt/gitlab/sv/logrotate/control/t
    - update content in file /opt/gitlab/sv/logrotate/control/t from none to 8fa3fa
    --- /opt/gitlab/sv/logrotate/control/t	2018-01-14 04:54:08.029286281 +0800
    +++ /opt/gitlab/sv/logrotate/control/.chef-t20180114-17778-1cklc2o	2018-01-14 04:54:08.029286281 +0800
    @@ -1 +1,4 @@
    +#!/bin/sh
    +echo "Received TERM from runit, sending to process group (-PID)"
    +kill -- -$(cat /opt/gitlab/service/logrotate/supervise/pid)
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * link[/opt/gitlab/init/logrotate] action create
    - create symlink at /opt/gitlab/init/logrotate to /opt/gitlab/embedded/bin/sv
  * link[/opt/gitlab/service/logrotate] action create
    - create symlink at /opt/gitlab/service/logrotate to /opt/gitlab/sv/logrotate
  * ruby_block[supervise_logrotate_sleep] action run
    - execute the ruby block supervise_logrotate_sleep
  * directory[/opt/gitlab/sv/logrotate/supervise] action create
    - change mode from '0700' to '0755'
  * directory[/opt/gitlab/sv/logrotate/log/supervise] action create
    - change mode from '0700' to '0755'
  * file[/opt/gitlab/sv/logrotate/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/logrotate/log/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/logrotate/supervise/control] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/logrotate/log/supervise/control] action touch (skipped due to only_if)
  * service[logrotate] action nothing (skipped due to action :nothing)
  * execute[/opt/gitlab/bin/gitlab-ctl start logrotate] action run
    [execute] ok: run: logrotate: (pid 18520) 2s
    - execute /opt/gitlab/bin/gitlab-ctl start logrotate
Recipe: gitlab::bootstrap
  * file[/var/opt/gitlab/bootstrapped] action create
    - create new file /var/opt/gitlab/bootstrapped
    - update content in file /var/opt/gitlab/bootstrapped from none to 4ae00c
    --- /var/opt/gitlab/bootstrapped	2018-01-14 04:54:11.842286411 +0800
    +++ /var/opt/gitlab/.chef-bootstrapped20180114-17778-18zyzph	2018-01-14 04:54:11.842286411 +0800
    @@ -1 +1,2 @@
    +All your bootstraps are belong to Chef
    - change mode from '' to '0600'
    - change owner from '' to 'root'
    - change group from '' to 'root'
Recipe: gitlab::mattermost_disable
  * link[/opt/gitlab/service/mattermost] action delete (up to date)
  * directory[/opt/gitlab/sv/mattermost] action delete (up to date)
Recipe: gitlab::gitlab-pages_disable
  * link[/opt/gitlab/service/gitlab-pages] action delete (up to date)
  * directory[/opt/gitlab/sv/gitlab-pages] action delete (up to date)
Recipe: registry::disable
  * link[/opt/gitlab/service/registry] action delete (up to date)
  * directory[/opt/gitlab/sv/registry] action delete (up to date)
Recipe: gitlab::gitlab-healthcheck
  * template[/opt/gitlab/etc/gitlab-healthcheck-rc] action create
    - create new file /opt/gitlab/etc/gitlab-healthcheck-rc
    - update content in file /opt/gitlab/etc/gitlab-healthcheck-rc from none to 5e6d6a
    --- /opt/gitlab/etc/gitlab-healthcheck-rc	2018-01-14 04:54:11.868286412 +0800
    +++ /opt/gitlab/etc/.chef-gitlab-healthcheck-rc20180114-17778-1bu32x3	2018-01-14 04:54:11.868286412 +0800
    @@ -1 +1,3 @@
    +url='http:///var/opt/gitlab/gitlab-workhorse/socket/help'
    +flags='--insecure'
    - change owner from '' to 'root'
    - change group from '' to 'root'
Recipe: gitlab::prometheus_user
  * group[Prometheus user and group] action create (up to date)
  * user[Prometheus user and group] action create (up to date)
Recipe: gitlab::node-exporter
  * directory[/var/log/gitlab/node-exporter] action create
    - create new directory /var/log/gitlab/node-exporter
    - change mode from '' to '0700'
    - change owner from '' to 'gitlab-prometheus'
  * directory[/var/opt/gitlab/node-exporter/textfile_collector] action create
    - create new directory /var/opt/gitlab/node-exporter/textfile_collector
    - change mode from '' to '0755'
    - change owner from '' to 'gitlab-prometheus'
  * directory[/opt/gitlab/sv/node-exporter] action create
    - create new directory /opt/gitlab/sv/node-exporter
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * directory[/opt/gitlab/sv/node-exporter/log] action create
    - create new directory /opt/gitlab/sv/node-exporter/log
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * directory[/opt/gitlab/sv/node-exporter/log/main] action create
    - create new directory /opt/gitlab/sv/node-exporter/log/main
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/node-exporter/run] action create
    - create new file /opt/gitlab/sv/node-exporter/run
    - update content in file /opt/gitlab/sv/node-exporter/run from none to 09c3e6
    --- /opt/gitlab/sv/node-exporter/run	2018-01-14 04:54:11.994286416 +0800
    +++ /opt/gitlab/sv/node-exporter/.chef-run20180114-17778-k7fh4q	2018-01-14 04:54:11.994286416 +0800
    @@ -1 +1,6 @@
    +#!/bin/sh
    +exec 2>&1
    +
    +umask 077
    +exec chpst -P -U gitlab-prometheus -u gitlab-prometheus /opt/gitlab/embedded/bin/node_exporter -web.listen-address=localhost:9100 -collector.textfile.directory=/var/opt/gitlab/node-exporter/textfile_collector
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/node-exporter/log/run] action create
    - create new file /opt/gitlab/sv/node-exporter/log/run
    - update content in file /opt/gitlab/sv/node-exporter/log/run from none to ae1796
    --- /opt/gitlab/sv/node-exporter/log/run	2018-01-14 04:54:12.002286417 +0800
    +++ /opt/gitlab/sv/node-exporter/log/.chef-run20180114-17778-qxgpep	2018-01-14 04:54:12.002286417 +0800
    @@ -1 +1,3 @@
    +#!/bin/sh
    +exec svlogd -tt /var/log/gitlab/node-exporter
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/var/log/gitlab/node-exporter/config] action create
    - create new file /var/log/gitlab/node-exporter/config
    - update content in file /var/log/gitlab/node-exporter/config from none to 623c00
    --- /var/log/gitlab/node-exporter/config	2018-01-14 04:54:12.021286417 +0800
    +++ /var/log/gitlab/node-exporter/.chef-config20180114-17778-1gzsf6i	2018-01-14 04:54:12.021286417 +0800
    @@ -1 +1,7 @@
    +s209715200
    +n30
    +t86400
    +!gzip
    +
    +
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * ruby_block[reload node-exporter svlogd configuration] action nothing (skipped due to action :nothing)
  * file[/opt/gitlab/sv/node-exporter/down] action delete (up to date)
  * link[/opt/gitlab/init/node-exporter] action create
    - create symlink at /opt/gitlab/init/node-exporter to /opt/gitlab/embedded/bin/sv
  * link[/opt/gitlab/service/node-exporter] action create
    - create symlink at /opt/gitlab/service/node-exporter to /opt/gitlab/sv/node-exporter
  * ruby_block[supervise_node-exporter_sleep] action run
    - execute the ruby block supervise_node-exporter_sleep
  * directory[/opt/gitlab/sv/node-exporter/supervise] action create
    - change mode from '0700' to '0755'
  * directory[/opt/gitlab/sv/node-exporter/log/supervise] action create
    - change mode from '0700' to '0755'
  * file[/opt/gitlab/sv/node-exporter/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/node-exporter/log/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/node-exporter/supervise/control] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/node-exporter/log/supervise/control] action touch (skipped due to only_if)
  * service[node-exporter] action nothing (skipped due to action :nothing)
  * execute[/opt/gitlab/bin/gitlab-ctl start node-exporter] action run
    [execute] ok: run: node-exporter: (pid 18565) 2s
    - execute /opt/gitlab/bin/gitlab-ctl start node-exporter
Recipe: gitlab::gitlab-monitor
  * directory[/var/opt/gitlab/gitlab-monitor] action create
    - create new directory /var/opt/gitlab/gitlab-monitor
    - change mode from '' to '0755'
    - change owner from '' to 'git'
  * directory[/var/log/gitlab/gitlab-monitor] action create
    - create new directory /var/log/gitlab/gitlab-monitor
    - change mode from '' to '0700'
    - change owner from '' to 'git'
  * template[/var/opt/gitlab/gitlab-monitor/gitlab-monitor.yml] action create
    - create new file /var/opt/gitlab/gitlab-monitor/gitlab-monitor.yml
    - update content in file /var/opt/gitlab/gitlab-monitor/gitlab-monitor.yml from none to 595ab9
    --- /var/opt/gitlab/gitlab-monitor/gitlab-monitor.yml	2018-01-14 04:54:17.961286619 +0800
    +++ /var/opt/gitlab/gitlab-monitor/.chef-gitlab-monitor.yml20180114-17778-12mclpq	2018-01-14 04:54:17.961286619 +0800
    @@ -1 +1,58 @@
    +db_common: &db_common
    +  methods:
    +    - probe_db
    +  opts:
    +    connection_string: dbname=gitlabhq_production user=gitlab host=/var/opt/gitlab/postgresql port=5432 password=
    +
    +# Web server config
    +server:
    +  listen_address: localhost
    +  listen_port: 9168
    +
    +# Probes config
    +probes:
    +  git_process:
    +    class_name: GitProcessProber # `class_name` is redundant here
    +    methods:
    +    - probe_git
    +    opts:
    +      quantiles: true
    +
    +  # We can group multiple probes under a single endpoint by setting the `multiple` key to `true`, followed
    +  # by probe definitions as usual.
    +  database:
    +    multiple: true
    +    ci_builds:
    +      class_name: Database::CiBuildsProber
    +      <<: *db_common
    +    tuple_stats:
    +      class_name: Database::TuplesProber
    +      <<: *db_common
    +    rows_count:
    +      class_name: Database::RowCountProber
    +      <<: *db_common
    +
    +  process:
    +    methods:
    +      - probe_memory
    +      - probe_age
    +      - probe_count
    +    opts:
    +      - pid_or_pattern: "sidekiq .* \[.*?\]"
    +        name: sidekiq
    +      - pid_or_pattern: "unicorn worker\[.*?\]"
    +        name: unicorn
    +      - pid_or_pattern: "git-upload-pack --stateless-rpc"
    +        name: git_upload_pack
    +        quantiles: true
    +
    +  sidekiq:
    +    methods:
    +      - probe_queues
    +      - probe_jobs
    +      - probe_workers
    +      - probe_retries
    +      - probe_dead
    +    opts:
    +      redis_url: "unix:/var/opt/gitlab/redis/redis.socket"
    - change mode from '' to '0644'
    - change owner from '' to 'git'
  * directory[/opt/gitlab/sv/gitlab-monitor] action create
    - create new directory /opt/gitlab/sv/gitlab-monitor
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * directory[/opt/gitlab/sv/gitlab-monitor/log] action create
    - create new directory /opt/gitlab/sv/gitlab-monitor/log
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * directory[/opt/gitlab/sv/gitlab-monitor/log/main] action create
    - create new directory /opt/gitlab/sv/gitlab-monitor/log/main
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/gitlab-monitor/run] action create
    - create new file /opt/gitlab/sv/gitlab-monitor/run
    - update content in file /opt/gitlab/sv/gitlab-monitor/run from none to 2f480f
    --- /opt/gitlab/sv/gitlab-monitor/run	2018-01-14 04:54:18.049286622 +0800
    +++ /opt/gitlab/sv/gitlab-monitor/.chef-run20180114-17778-fjutc4	2018-01-14 04:54:18.049286622 +0800
    @@ -1 +1,6 @@
    +#!/bin/sh
    +exec 2>&1
    +
    +umask 077
    +exec chpst -P -U git -u git /opt/gitlab/embedded/bin/gitlab-mon web -c /var/opt/gitlab/gitlab-monitor/gitlab-monitor.yml
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/gitlab-monitor/log/run] action create
    - create new file /opt/gitlab/sv/gitlab-monitor/log/run
    - update content in file /opt/gitlab/sv/gitlab-monitor/log/run from none to be403a
    --- /opt/gitlab/sv/gitlab-monitor/log/run	2018-01-14 04:54:18.074286623 +0800
    +++ /opt/gitlab/sv/gitlab-monitor/log/.chef-run20180114-17778-1y5hmxu	2018-01-14 04:54:18.073286623 +0800
    @@ -1 +1,3 @@
    +#!/bin/sh
    +exec svlogd -tt /var/log/gitlab/gitlab-monitor
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/var/log/gitlab/gitlab-monitor/config] action create
    - create new file /var/log/gitlab/gitlab-monitor/config
    - update content in file /var/log/gitlab/gitlab-monitor/config from none to 623c00
    --- /var/log/gitlab/gitlab-monitor/config	2018-01-14 04:54:18.100286624 +0800
    +++ /var/log/gitlab/gitlab-monitor/.chef-config20180114-17778-1euqoc3	2018-01-14 04:54:18.100286624 +0800
    @@ -1 +1,7 @@
    +s209715200
    +n30
    +t86400
    +!gzip
    +
    +
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * ruby_block[reload gitlab-monitor svlogd configuration] action nothing (skipped due to action :nothing)
  * file[/opt/gitlab/sv/gitlab-monitor/down] action delete (up to date)
  * link[/opt/gitlab/init/gitlab-monitor] action create
    - create symlink at /opt/gitlab/init/gitlab-monitor to /opt/gitlab/embedded/bin/sv
  * link[/opt/gitlab/service/gitlab-monitor] action create
    - create symlink at /opt/gitlab/service/gitlab-monitor to /opt/gitlab/sv/gitlab-monitor
  * ruby_block[supervise_gitlab-monitor_sleep] action run
    - execute the ruby block supervise_gitlab-monitor_sleep
  * directory[/opt/gitlab/sv/gitlab-monitor/supervise] action create
    - change mode from '0700' to '0755'
  * directory[/opt/gitlab/sv/gitlab-monitor/log/supervise] action create
    - change mode from '0700' to '0755'
  * file[/opt/gitlab/sv/gitlab-monitor/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/gitlab-monitor/log/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/gitlab-monitor/supervise/control] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/gitlab-monitor/log/supervise/control] action touch (skipped due to only_if)
  * service[gitlab-monitor] action nothing (skipped due to action :nothing)
  * execute[/opt/gitlab/bin/gitlab-ctl start gitlab-monitor] action run
    [execute] ok: run: gitlab-monitor: (pid 18608) 3s
    - execute /opt/gitlab/bin/gitlab-ctl start gitlab-monitor
Recipe: gitlab::redis-exporter
  * directory[/var/log/gitlab/redis-exporter] action create
    - create new directory /var/log/gitlab/redis-exporter
    - change mode from '' to '0700'
    - change owner from '' to 'gitlab-redis'
  * directory[/opt/gitlab/sv/redis-exporter] action create
    - create new directory /opt/gitlab/sv/redis-exporter
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * directory[/opt/gitlab/sv/redis-exporter/log] action create
    - create new directory /opt/gitlab/sv/redis-exporter/log
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * directory[/opt/gitlab/sv/redis-exporter/log/main] action create
    - create new directory /opt/gitlab/sv/redis-exporter/log/main
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/redis-exporter/run] action create
    - create new file /opt/gitlab/sv/redis-exporter/run
    - update content in file /opt/gitlab/sv/redis-exporter/run from none to fa3e94
    --- /opt/gitlab/sv/redis-exporter/run	2018-01-14 04:54:24.361286837 +0800
    +++ /opt/gitlab/sv/redis-exporter/.chef-run20180114-17778-1nzjd1x	2018-01-14 04:54:24.361286837 +0800
    @@ -1 +1,6 @@
    +#!/bin/sh
    +exec 2>&1
    +
    +umask 077
    +exec chpst -P -U gitlab-redis:git -u gitlab-redis:git /opt/gitlab/embedded/bin/redis_exporter -web.listen-address=localhost:9121 -redis.addr=unix:///var/opt/gitlab/redis/redis.socket
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/redis-exporter/log/run] action create
    - create new file /opt/gitlab/sv/redis-exporter/log/run
    - update content in file /opt/gitlab/sv/redis-exporter/log/run from none to 082dea
    --- /opt/gitlab/sv/redis-exporter/log/run	2018-01-14 04:54:24.392286838 +0800
    +++ /opt/gitlab/sv/redis-exporter/log/.chef-run20180114-17778-1w1rpzm	2018-01-14 04:54:24.392286838 +0800
    @@ -1 +1,3 @@
    +#!/bin/sh
    +exec svlogd -tt /var/log/gitlab/redis-exporter
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/var/log/gitlab/redis-exporter/config] action create
    - create new file /var/log/gitlab/redis-exporter/config
    - update content in file /var/log/gitlab/redis-exporter/config from none to 623c00
    --- /var/log/gitlab/redis-exporter/config	2018-01-14 04:54:24.424286839 +0800
    +++ /var/log/gitlab/redis-exporter/.chef-config20180114-17778-1iu96jr	2018-01-14 04:54:24.423286839 +0800
    @@ -1 +1,7 @@
    +s209715200
    +n30
    +t86400
    +!gzip
    +
    +
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * ruby_block[reload redis-exporter svlogd configuration] action nothing (skipped due to action :nothing)
  * file[/opt/gitlab/sv/redis-exporter/down] action delete (up to date)
  * link[/opt/gitlab/init/redis-exporter] action create
    - create symlink at /opt/gitlab/init/redis-exporter to /opt/gitlab/embedded/bin/sv
  * link[/opt/gitlab/service/redis-exporter] action create
    - create symlink at /opt/gitlab/service/redis-exporter to /opt/gitlab/sv/redis-exporter
  * ruby_block[supervise_redis-exporter_sleep] action run
    - execute the ruby block supervise_redis-exporter_sleep
  * directory[/opt/gitlab/sv/redis-exporter/supervise] action create
    - change mode from '0700' to '0755'
  * directory[/opt/gitlab/sv/redis-exporter/log/supervise] action create
    - change mode from '0700' to '0755'
  * file[/opt/gitlab/sv/redis-exporter/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/redis-exporter/log/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/redis-exporter/supervise/control] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/redis-exporter/log/supervise/control] action touch (skipped due to only_if)
  * service[redis-exporter] action nothing (skipped due to action :nothing)
  * execute[/opt/gitlab/bin/gitlab-ctl start redis-exporter] action run
    [execute] ok: run: redis-exporter: (pid 18648) 3s
    - execute /opt/gitlab/bin/gitlab-ctl start redis-exporter
Recipe: gitlab::prometheus
  * directory[/var/opt/gitlab/prometheus] action create
    - create new directory /var/opt/gitlab/prometheus
    - change mode from '' to '0750'
    - change owner from '' to 'gitlab-prometheus'
  * directory[/var/log/gitlab/prometheus] action create
    - create new directory /var/log/gitlab/prometheus
    - change mode from '' to '0700'
    - change owner from '' to 'gitlab-prometheus'
  * file[Prometheus config] action create
    - create new file /var/opt/gitlab/prometheus/prometheus.yml
    - update content in file /var/opt/gitlab/prometheus/prometheus.yml from none to 841563
    --- /var/opt/gitlab/prometheus/prometheus.yml	2018-01-14 04:54:30.393287041 +0800
    +++ /var/opt/gitlab/prometheus/.chef-Prometheus config20180114-17778-18nrr6f	2018-01-14 04:54:30.393287041 +0800
    @@ -1 +1,107 @@
    +---
    +global:
    +  scrape_interval: 15s
    +  scrape_timeout: 15s
    +scrape_configs:
    +- job_name: prometheus
    +  static_configs:
    +  - targets:
    +    - localhost:9090
    +- job_name: redis
    +  static_configs:
    +  - targets:
    +    - localhost:9121
    +- job_name: postgres
    +  static_configs:
    +  - targets:
    +    - localhost:9187
    +- job_name: node
    +  static_configs:
    +  - targets:
    +    - localhost:9100
    +- job_name: gitlab-unicorn
    +  metrics_path: "/-/metrics"
    +  static_configs:
    +  - targets:
    +    - 127.0.0.1:8081
    +- job_name: gitlab_monitor_database
    +  metrics_path: "/database"
    +  static_configs:
    +  - targets:
    +    - localhost:9168
    +- job_name: gitlab_monitor_sidekiq
    +  metrics_path: "/sidekiq"
    +  static_configs:
    +  - targets:
    +    - localhost:9168
    +- job_name: gitlab_monitor_process
    +  metrics_path: "/process"
    +  static_configs:
    +  - targets:
    +    - localhost:9168
    +- job_name: kubernetes-nodes
    +  scheme: https
    +  tls_config:
    +    ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
    +    insecure_skip_verify: true
    +  bearer_token_file: "/var/run/secrets/kubernetes.io/serviceaccount/token"
    +  kubernetes_sd_configs:
    +  - role: node
    +    api_server: https://kubernetes.default.svc:443
    +    tls_config:
    +      ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
    +    bearer_token_file: "/var/run/secrets/kubernetes.io/serviceaccount/token"
    +  relabel_configs:
    +  - action: labelmap
    +    regex: __meta_kubernetes_node_label_(.+)
    +  - target_label: __address__
    +    replacement: kubernetes.default.svc:443
    +  - source_labels:
    +    - __meta_kubernetes_node_name
    +    regex: "(.+)"
    +    target_label: __metrics_path__
    +    replacement: "/api/v1/nodes/${1}/proxy/metrics"
    +  metric_relabel_configs:
    +  - source_labels:
    +    - pod_name
    +    target_label: environment
    +    regex: "(.+)-.+-.+"
    +- job_name: kubernetes-pods
    +  tls_config:
    +    ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
    +    insecure_skip_verify: true
    +  bearer_token_file: "/var/run/secrets/kubernetes.io/serviceaccount/token"
    +  kubernetes_sd_configs:
    +  - role: pod
    +    api_server: https://kubernetes.default.svc:443
    +    tls_config:
    +      ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
    +    bearer_token_file: "/var/run/secrets/kubernetes.io/serviceaccount/token"
    +  relabel_configs:
    +  - source_labels:
    +    - __meta_kubernetes_pod_annotation_prometheus_io_scrape
    +    action: keep
    +    regex: 'true'
    +  - source_labels:
    +    - __meta_kubernetes_pod_annotation_prometheus_io_path
    +    action: replace
    +    target_label: __metrics_path__
    +    regex: "(.+)"
    +  - source_labels:
    +    - __address__
    +    - __meta_kubernetes_pod_annotation_prometheus_io_port
    +    action: replace
    +    regex: "([^:]+)(?::[0-9]+)?;([0-9]+)"
    +    replacement: "$1:$2"
    +    target_label: __address__
    +  - action: labelmap
    +    regex: __meta_kubernetes_pod_label_(.+)
    +  - source_labels:
    +    - __meta_kubernetes_namespace
    +    action: replace
    +    target_label: kubernetes_namespace
    +  - source_labels:
    +    - __meta_kubernetes_pod_name
    +    action: replace
    +    target_label: kubernetes_pod_name
    - change mode from '' to '0644'
    - change owner from '' to 'gitlab-prometheus'
  * directory[/opt/gitlab/sv/prometheus] action create
    - create new directory /opt/gitlab/sv/prometheus
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * directory[/opt/gitlab/sv/prometheus/log] action create
    - create new directory /opt/gitlab/sv/prometheus/log
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * directory[/opt/gitlab/sv/prometheus/log/main] action create
    - create new directory /opt/gitlab/sv/prometheus/log/main
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/prometheus/run] action create
    - create new file /opt/gitlab/sv/prometheus/run
    - update content in file /opt/gitlab/sv/prometheus/run from none to d16e16
    --- /opt/gitlab/sv/prometheus/run	2018-01-14 04:54:30.495287045 +0800
    +++ /opt/gitlab/sv/prometheus/.chef-run20180114-17778-18tt3u7	2018-01-14 04:54:30.495287045 +0800
    @@ -1 +1,7 @@
    +#!/bin/sh
    +exec 2>&1
    +
    +umask 077
    +exec chpst -P -U gitlab-prometheus -u gitlab-prometheus 
    +  /opt/gitlab/embedded/bin/prometheus -web.listen-address=localhost:9090 -storage.local.path=/var/opt/gitlab/prometheus/data -storage.local.chunk-encoding-version=2 -storage.local.target-heap-size=64787496 -config.file=/var/opt/gitlab/prometheus/prometheus.yml
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/prometheus/log/run] action create
    - create new file /opt/gitlab/sv/prometheus/log/run
    - update content in file /opt/gitlab/sv/prometheus/log/run from none to 072b20
    --- /opt/gitlab/sv/prometheus/log/run	2018-01-14 04:54:30.527287046 +0800
    +++ /opt/gitlab/sv/prometheus/log/.chef-run20180114-17778-1v6j6fv	2018-01-14 04:54:30.526287046 +0800
    @@ -1 +1,3 @@
    +#!/bin/sh
    +exec svlogd -tt /var/log/gitlab/prometheus
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/var/log/gitlab/prometheus/config] action create
    - create new file /var/log/gitlab/prometheus/config
    - update content in file /var/log/gitlab/prometheus/config from none to 623c00
    --- /var/log/gitlab/prometheus/config	2018-01-14 04:54:30.567287048 +0800
    +++ /var/log/gitlab/prometheus/.chef-config20180114-17778-1yekb4d	2018-01-14 04:54:30.567287048 +0800
    @@ -1 +1,7 @@
    +s209715200
    +n30
    +t86400
    +!gzip
    +
    +
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * ruby_block[reload prometheus svlogd configuration] action nothing (skipped due to action :nothing)
  * file[/opt/gitlab/sv/prometheus/down] action delete (up to date)
  * link[/opt/gitlab/init/prometheus] action create
    - create symlink at /opt/gitlab/init/prometheus to /opt/gitlab/embedded/bin/sv
  * link[/opt/gitlab/service/prometheus] action create
    - create symlink at /opt/gitlab/service/prometheus to /opt/gitlab/sv/prometheus
  * ruby_block[supervise_prometheus_sleep] action run
    - execute the ruby block supervise_prometheus_sleep
  * directory[/opt/gitlab/sv/prometheus/supervise] action create
    - change mode from '0700' to '0755'
  * directory[/opt/gitlab/sv/prometheus/log/supervise] action create
    - change mode from '0700' to '0755'
  * file[/opt/gitlab/sv/prometheus/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/prometheus/log/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/prometheus/supervise/control] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/prometheus/log/supervise/control] action touch (skipped due to only_if)
  * service[prometheus] action nothing (skipped due to action :nothing)
  * execute[/opt/gitlab/bin/gitlab-ctl start prometheus] action run
    [execute] ok: run: prometheus: (pid 18687) 3s
    - execute /opt/gitlab/bin/gitlab-ctl start prometheus
Recipe: gitlab::postgres-exporter
  * directory[/var/log/gitlab/postgres-exporter] action create
    - create new directory /var/log/gitlab/postgres-exporter
    - change mode from '' to '0700'
    - change owner from '' to 'gitlab-psql'
  * directory[/var/opt/gitlab/postgres-exporter] action create
    - create new directory /var/opt/gitlab/postgres-exporter
    - change mode from '' to '0700'
    - change owner from '' to 'gitlab-psql'
  * directory[/opt/gitlab/etc/postgres-exporter/env] action create
    - create new directory /opt/gitlab/etc/postgres-exporter/env
  * file[/opt/gitlab/etc/postgres-exporter/env/DATA_SOURCE_NAME] action create
    - create new file /opt/gitlab/etc/postgres-exporter/env/DATA_SOURCE_NAME
    - update content in file /opt/gitlab/etc/postgres-exporter/env/DATA_SOURCE_NAME from none to cd58e5
    --- /opt/gitlab/etc/postgres-exporter/env/DATA_SOURCE_NAME	2018-01-14 04:54:37.056287267 +0800
    +++ /opt/gitlab/etc/postgres-exporter/env/.chef-DATA_SOURCE_NAME20180114-17778-h9pe3a	2018-01-14 04:54:37.056287267 +0800
    @@ -1 +1,2 @@
    +user=gitlab-psql host=/var/opt/gitlab/postgresql database=postgres sslmode=allow
  * directory[/opt/gitlab/sv/postgres-exporter] action create
    - create new directory /opt/gitlab/sv/postgres-exporter
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * directory[/opt/gitlab/sv/postgres-exporter/log] action create
    - create new directory /opt/gitlab/sv/postgres-exporter/log
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * directory[/opt/gitlab/sv/postgres-exporter/log/main] action create
    - create new directory /opt/gitlab/sv/postgres-exporter/log/main
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/postgres-exporter/run] action create
    - create new file /opt/gitlab/sv/postgres-exporter/run
    - update content in file /opt/gitlab/sv/postgres-exporter/run from none to ee42a2
    --- /opt/gitlab/sv/postgres-exporter/run	2018-01-14 04:54:37.125287270 +0800
    +++ /opt/gitlab/sv/postgres-exporter/.chef-run20180114-17778-1a4fvkz	2018-01-14 04:54:37.124287270 +0800
    @@ -1 +1,7 @@
    +#!/bin/sh
    +exec 2>&1
    +
    +umask 077
    +exec chpst -e /opt/gitlab/etc/postgres-exporter/env -P -U gitlab-psql:git -u gitlab-psql:git /opt/gitlab/embedded/bin/postgres_exporter -web.listen-address=localhost:9187 -extend.query-path=/var/opt/gitlab/postgres-exporter/queries.yaml
    +
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/opt/gitlab/sv/postgres-exporter/log/run] action create
    - create new file /opt/gitlab/sv/postgres-exporter/log/run
    - update content in file /opt/gitlab/sv/postgres-exporter/log/run from none to b971c9
    --- /opt/gitlab/sv/postgres-exporter/log/run	2018-01-14 04:54:37.155287271 +0800
    +++ /opt/gitlab/sv/postgres-exporter/log/.chef-run20180114-17778-1ai38rb	2018-01-14 04:54:37.155287271 +0800
    @@ -1 +1,3 @@
    +#!/bin/sh
    +exec svlogd -tt /var/log/gitlab/postgres-exporter
    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/var/log/gitlab/postgres-exporter/config] action create
    - create new file /var/log/gitlab/postgres-exporter/config
    - update content in file /var/log/gitlab/postgres-exporter/config from none to 623c00
    --- /var/log/gitlab/postgres-exporter/config	2018-01-14 04:54:37.192287272 +0800
    +++ /var/log/gitlab/postgres-exporter/.chef-config20180114-17778-xxb79y	2018-01-14 04:54:37.192287272 +0800
    @@ -1 +1,7 @@
    +s209715200
    +n30
    +t86400
    +!gzip
    +
    +
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * ruby_block[reload postgres-exporter svlogd configuration] action nothing (skipped due to action :nothing)
  * file[/opt/gitlab/sv/postgres-exporter/down] action delete (up to date)
  * link[/opt/gitlab/init/postgres-exporter] action create
    - create symlink at /opt/gitlab/init/postgres-exporter to /opt/gitlab/embedded/bin/sv
  * link[/opt/gitlab/service/postgres-exporter] action create
    - create symlink at /opt/gitlab/service/postgres-exporter to /opt/gitlab/sv/postgres-exporter
  * ruby_block[supervise_postgres-exporter_sleep] action run
    - execute the ruby block supervise_postgres-exporter_sleep
  * directory[/opt/gitlab/sv/postgres-exporter/supervise] action create
    - change mode from '0700' to '0755'
  * directory[/opt/gitlab/sv/postgres-exporter/log/supervise] action create
    - change mode from '0700' to '0755'
  * file[/opt/gitlab/sv/postgres-exporter/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/postgres-exporter/log/supervise/ok] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/postgres-exporter/supervise/control] action touch (skipped due to only_if)
  * file[/opt/gitlab/sv/postgres-exporter/log/supervise/control] action touch (skipped due to only_if)
  * service[postgres-exporter] action nothing (skipped due to action :nothing)
  * template[/var/opt/gitlab/postgres-exporter/queries.yaml] action create
    - create new file /var/opt/gitlab/postgres-exporter/queries.yaml
    - update content in file /var/opt/gitlab/postgres-exporter/queries.yaml from none to f7537d
    --- /var/opt/gitlab/postgres-exporter/queries.yaml	2018-01-14 04:54:40.274287376 +0800
    +++ /var/opt/gitlab/postgres-exporter/.chef-queries.yaml20180114-17778-j56xjt	2018-01-14 04:54:40.274287376 +0800
    @@ -1 +1,174 @@
    +pg_replication:
    +  query: "SELECT EXTRACT(EPOCH FROM (now() - pg_last_xact_replay_timestamp()))::INT as lag"
    +  metrics:
    +    - lag:
    +        usage: "GAUGE"
    +        description: "Replication lag behind master in seconds"
    +
    +pg_postmaster:
    +  query: "SELECT pg_postmaster_start_time as start_time_seconds from pg_postmaster_start_time()"
    +  metrics:
    +    - start_time_seconds:
    +        usage: "GAUGE"
    +        description: "Time at which postmaster started"
    +
    +pg_settings_shared_buffers:
    +  query: "SELECT 8192*setting::bigint as bytes from pg_settings where name = 'shared_buffers'"
    +  metrics:
    +    - bytes:
    +        usage: "GAUGE"
    +        description: "Size of shared_buffers"
    +
    +pg_settings_checkpoint:
    +  query: "select (select setting::int from pg_settings where name = 'checkpoint_segments') as segments, (select setting::int from pg_settings where name = 'checkpoint_timeout') as timeout_seconds, (select setting::float from pg_settings where name = 'checkpoint_completion_target') as completion_target"
    +  metrics:
    +    - segments:
    +        usage: "GAUGE"
    +        description: "Number of checkpoint segments"
    +    - timeout_seconds:
    +        usage: "GAUGE"
    +        description: "Checkpoint timeout in seconds"
    +    - completion_target:
    +        usage: "GAUGE"
    +        description: "Checkpoint completion target, ranging from 0 to 1"
    +
    +pg_stat_user_tables:
    +  query: "SELECT schemaname, relname, seq_scan, seq_tup_read, idx_scan, idx_tup_fetch, n_tup_ins, n_tup_upd, n_tup_del, n_tup_hot_upd, n_live_tup, n_dead_tup, n_mod_since_analyze, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze, vacuum_count, autovacuum_count, analyze_count, autoanalyze_count FROM pg_stat_user_tables"
    +  metrics:
    +    - schemaname:
    +        usage: "LABEL"
    +        description: "Name of the schema that this table is in"
    +    - relname:
    +        usage: "LABEL"
    +        description: "Name of this table"
    +    - seq_scan:
    +        usage: "COUNTER"
    +        description: "Number of sequential scans initiated on this table"
    +    - seq_tup_read:
    +        usage: "COUNTER"
    +        description: "Number of live rows fetched by sequential scans"
    +    - idx_scan:
    +        usage: "COUNTER"
    +        description: "Number of index scans initiated on this table"
    +    - idx_tup_fetch:
    +        usage: "COUNTER"
    +        description: "Number of live rows fetched by index scans"
    +    - n_tup_ins:
    +        usage: "COUNTER"
    +        description: "Number of rows inserted"
    +    - n_tup_upd:
    +        usage: "COUNTER"
    +        description: "Number of rows updated"
    +    - n_tup_del:
    +        usage: "COUNTER"
    +        description: "Number of rows deleted"
    +    - n_tup_hot_upd:
    +        usage: "COUNTER"
    +        description: "Number of rows HOT updated (i.e., with no separate index update required)"
    +    - n_live_tup:
    +        usage: "GAUGE"
    +        description: "Estimated number of live rows"
    +    - n_dead_tup:
    +        usage: "GAUGE"
    +        description: "Estimated number of dead rows"
    +    - n_mod_since_analyze:
    +        usage: "GAUGE"
    +        description: "Estimated number of rows changed since last analyze"
    +    - last_vacuum:
    +        usage: "GAUGE"
    +        description: "Last time at which this table was manually vacuumed (not counting VACUUM FULL)"
    +    - last_autovacuum:
    +        usage: "GAUGE"
    +        description: "Last time at which this table was vacuumed by the autovacuum daemon"
    +    - last_analyze:
    +        usage: "GAUGE"
    +        description: "Last time at which this table was manually analyzed"
    +    - last_autoanalyze:
    +        usage: "GAUGE"
    +        description: "Last time at which this table was analyzed by the autovacuum daemon"
    +    - vacuum_count:
    +        usage: "COUNTER"
    +        description: "Number of times this table has been manually vacuumed (not counting VACUUM FULL)"
    +    - autovacuum_count:
    +        usage: "COUNTER"
    +        description: "Number of times this table has been vacuumed by the autovacuum daemon"
    +    - analyze_count:
    +        usage: "COUNTER"
    +        description: "Number of times this table has been manually analyzed"
    +    - autoanalyze_count:
    +        usage: "COUNTER"
    +        description: "Number of times this table has been analyzed by the autovacuum daemon"
    +
    +pg_blocked:
    +  query: |
    +    SELECT
    +      count(blocked.transactionid) AS queries,
    +      '__transaction__' AS table
    +    FROM pg_catalog.pg_locks blocked
    +    WHERE NOT blocked.granted AND locktype = 'transactionid'
    +    GROUP BY locktype
    +    UNION
    +    SELECT
    +      count(blocked.relation) AS queries,
    +      blocked.relation::regclass::text AS table
    +    FROM pg_catalog.pg_locks blocked
    +    WHERE NOT blocked.granted AND locktype != 'transactionid'
    +    GROUP BY relation
    +  metrics:
    +    - queries:
    +        usage: "GAUGE"
    +        description: "The current number of blocked queries"
    +    - table:
    +        usage: "LABEL"
    +        description: "The table on which a query is blocked"
    +
    +pg_slow:
    +  query: |
    +    SELECT COUNT(*) AS queries
    +    FROM pg_stat_activity
    +    WHERE state = 'active' AND (now() - query_start) > '1 seconds'::interval
    +  metrics:
    +    - queries:
    +        usage: "GAUGE"
    +        description: "Current number of slow queries"
    +
    +pg_vacuum:
    +  query: |
    +    SELECT
    +      COUNT(*) AS queries,
    +      MAX(EXTRACT(EPOCH FROM (clock_timestamp() - query_start))) AS age_in_seconds
    +    FROM pg_catalog.pg_stat_activity
    +    WHERE state = 'active' AND trim(query) ~* 'AVACUUM (?!ANALYZE)'
    +  metrics:
    +    - queries:
    +        usage: "GAUGE"
    +        description: "The current number of VACUUM queries"
    +    - age_in_seconds:
    +        usage: "GAUGE"
    +        description: "The current maximum VACUUM query age in seconds"
    +
    +pg_vacuum_analyze:
    +  query: |
    +    SELECT
    +      COUNT(*) AS queries,
    +      MAX(EXTRACT(EPOCH FROM (clock_timestamp() - query_start))) AS age_in_seconds
    +    FROM pg_catalog.pg_stat_activity
    +    WHERE state = 'active' AND trim(query) ~* 'AVACUUM ANALYZE'
    +  metrics:
    +    - queries:
    +        usage: "GAUGE"
    +        description: "The current number of VACUUM ANALYZE queries"
    +    - age_in_seconds:
    +        usage: "GAUGE"
    +        description: "The current maximum VACUUM ANALYZE query age in seconds"
    +
    +pg_stuck_idle_in_transaction:
    +  query: |
    +    SELECT COUNT(*) AS queries
    +    FROM pg_stat_activity
    +    WHERE state = 'idle in transaction' AND (now() - query_start) > '10 minutes'::interval
    +  metrics:
    +    - queries:
    +        usage: "GAUGE"
    +        description: "Current number of queries that are stuck being idle in transactions"
    - change mode from '' to '0644'
    - change owner from '' to 'gitlab-psql'
  * execute[/opt/gitlab/bin/gitlab-ctl start postgres-exporter] action run
    [execute] ok: run: postgres-exporter: (pid 18731) 3s
    - execute /opt/gitlab/bin/gitlab-ctl start postgres-exporter
Recipe: gitlab::postgresql
  * ruby_block[reload postgresql svlogd configuration] action create
    - execute the ruby block reload postgresql svlogd configuration
Recipe: gitlab::unicorn
  * ruby_block[reload unicorn svlogd configuration] action create
    - execute the ruby block reload unicorn svlogd configuration
Recipe: gitlab::sidekiq
  * ruby_block[reload sidekiq svlogd configuration] action create
    - execute the ruby block reload sidekiq svlogd configuration
Recipe: gitlab::gitaly
  * service[gitaly] action restart
    - restart service service[gitaly]
  * ruby_block[reload gitaly svlogd configuration] action create
    - execute the ruby block reload gitaly svlogd configuration
Recipe: gitlab::gitlab-workhorse
  * service[gitlab-workhorse] action restart
    - restart service service[gitlab-workhorse]
  * ruby_block[reload gitlab-workhorse svlogd configuration] action create
    - execute the ruby block reload gitlab-workhorse svlogd configuration
Recipe: gitlab::logrotate
  * ruby_block[reload logrotate svlogd configuration] action create
    - execute the ruby block reload logrotate svlogd configuration
Recipe: gitlab::node-exporter
  * ruby_block[reload node-exporter svlogd configuration] action create
    - execute the ruby block reload node-exporter svlogd configuration
Recipe: gitlab::gitlab-monitor
  * service[gitlab-monitor] action restart
    - restart service service[gitlab-monitor]
  * ruby_block[reload gitlab-monitor svlogd configuration] action create
    - execute the ruby block reload gitlab-monitor svlogd configuration
Recipe: gitlab::redis-exporter
  * ruby_block[reload redis-exporter svlogd configuration] action create
    - execute the ruby block reload redis-exporter svlogd configuration
Recipe: gitlab::prometheus
  * service[prometheus] action restart
    - restart service service[prometheus]
  * ruby_block[reload prometheus svlogd configuration] action create
    - execute the ruby block reload prometheus svlogd configuration
Recipe: gitlab::postgres-exporter
  * service[postgres-exporter] action restart
    - restart service service[postgres-exporter]
  * ruby_block[reload postgres-exporter svlogd configuration] action create
    - execute the ruby block reload postgres-exporter svlogd configuration

Running handlers:
Running handlers complete
Chef Client finished, 235/482 resources updated in 02 minutes 06 seconds
gitlab Reconfigured!
[root@linux gitlab]# ^C
[root@linux gitlab]# 

原文地址:https://www.cnblogs.com/ioveNature/p/8282251.html