Commit d1c3f3d8 authored by Annabel Dunstone's avatar Annabel Dunstone

Add monitoring link with subtabs

parent 922a164d
%ul.nav-links.sub-nav
%div{ class: (container_class) }
= nav_link(controller: :background_jobs) do
= link_to admin_background_jobs_path, title: 'Background Jobs' do
%span
Background Jobs
= nav_link(controller: :logs) do
= link_to admin_logs_path, title: 'Logs' do
%span
Logs
= nav_link(controller: :health_check) do
= link_to admin_health_check_path, title: 'Health Check' do
%span
Health Check
- @no_container = true
- page_title "Background Jobs" - page_title "Background Jobs"
%h3.page-title Background Jobs = render 'admin/background_jobs/head'
%p.light GitLab uses #{link_to "sidekiq", "http://sidekiq.org/"} library for async job processing
%hr %div{ class: (container_class) }
%h3.page-title Background Jobs
%p.light GitLab uses #{link_to "sidekiq", "http://sidekiq.org/"} library for async job processing
.panel.panel-default %hr
.panel-heading Sidekiq running processes
.panel-body
- if @sidekiq_processes.empty?
%h4.cred
%i.fa.fa-exclamation-triangle
There are no running sidekiq processes. Please restart GitLab
- else
.table-holder
%table.table
%thead
%th USER
%th PID
%th CPU
%th MEM
%th STATE
%th START
%th COMMAND
%tbody
- @sidekiq_processes.each do |process|
- next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/)
- data = process.strip.split(' ')
%tr
%td= gitlab_config.user
- 5.times do
%td= data.shift
%td= data.join(' ')
.clearfix .panel.panel-default
%p .panel-heading Sidekiq running processes
%i.fa.fa-exclamation-circle .panel-body
If '[25 of 25 busy]' is shown, restart GitLab with 'sudo service gitlab reload'. - if @sidekiq_processes.empty?
%p %h4.cred
%i.fa.fa-exclamation-circle %i.fa.fa-exclamation-triangle
If more than one sidekiq process is listed, stop GitLab, kill the remaining sidekiq processes (sudo pkill -u #{gitlab_config.user} -f sidekiq) and restart GitLab. There are no running sidekiq processes. Please restart GitLab
- else
.table-holder
%table.table
%thead
%th USER
%th PID
%th CPU
%th MEM
%th STATE
%th START
%th COMMAND
%tbody
- @sidekiq_processes.each do |process|
- next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/)
- data = process.strip.split(' ')
%tr
%td= gitlab_config.user
- 5.times do
%td= data.shift
%td= data.join(' ')
.clearfix
%p
%i.fa.fa-exclamation-circle
If '[25 of 25 busy]' is shown, restart GitLab with 'sudo service gitlab reload'.
%p
%i.fa.fa-exclamation-circle
If more than one sidekiq process is listed, stop GitLab, kill the remaining sidekiq processes (sudo pkill -u #{gitlab_config.user} -f sidekiq) and restart GitLab.
.panel.panel-default
%iframe{src: sidekiq_path, width: '100%', height: 970, style: "border: none"} .panel.panel-default
%iframe{src: sidekiq_path, width: '100%', height: 970, style: "border: none"}
- @no_container = true
- page_title "Health Check" - page_title "Health Check"
= render 'admin/background_jobs/head'
%h3.page-title %div{ class: (container_class) }
Health Check %h3.page-title
.bs-callout.clearfix Health Check
.pull-left .bs-callout.clearfix
%p .pull-left
Access token is %p
%code#health-check-token= current_application_settings.health_check_access_token Access token is
= button_to reset_health_check_token_admin_application_settings_path, %code#health-check-token= current_application_settings.health_check_access_token
method: :put, class: 'btn btn-default', = button_to reset_health_check_token_admin_application_settings_path,
data: { confirm: 'Are you sure you want to reset the health check token?' } do method: :put, class: 'btn btn-default',
= icon('refresh') data: { confirm: 'Are you sure you want to reset the health check token?' } do
Reset health check access token = icon('refresh')
%p.light Reset health check access token
Health information can be retrieved as plain text, JSON, or XML using: %p.light
%ul Health information can be retrieved as plain text, JSON, or XML using:
%li %ul
%code= health_check_url(token: current_application_settings.health_check_access_token) %li
%li %code= health_check_url(token: current_application_settings.health_check_access_token)
%code= health_check_url(token: current_application_settings.health_check_access_token, format: :json) %li
%li %code= health_check_url(token: current_application_settings.health_check_access_token, format: :json)
%code= health_check_url(token: current_application_settings.health_check_access_token, format: :xml) %li
%code= health_check_url(token: current_application_settings.health_check_access_token, format: :xml)
%p.light %p.light
You can also ask for the status of specific services: You can also ask for the status of specific services:
%ul %ul
%li %li
%code= health_check_url(token: current_application_settings.health_check_access_token, checks: :cache) %code= health_check_url(token: current_application_settings.health_check_access_token, checks: :cache)
%li %li
%code= health_check_url(token: current_application_settings.health_check_access_token, checks: :database) %code= health_check_url(token: current_application_settings.health_check_access_token, checks: :database)
%li %li
%code= health_check_url(token: current_application_settings.health_check_access_token, checks: :migrations) %code= health_check_url(token: current_application_settings.health_check_access_token, checks: :migrations)
%hr %hr
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
Current Status: Current Status:
- if @errors.blank? - if @errors.blank?
= icon('circle', class: 'cgreen') = icon('circle', class: 'cgreen')
Healthy Healthy
- else - else
= icon('warning', class: 'cred') = icon('warning', class: 'cred')
Unhealthy Unhealthy
.panel-body .panel-body
- if @errors.blank? - if @errors.blank?
No Health Problems Detected No Health Problems Detected
- else - else
= @errors = @errors
- @no_container = true
- page_title "Logs" - page_title "Logs"
- loggers = [Gitlab::GitLogger, Gitlab::AppLogger, - loggers = [Gitlab::GitLogger, Gitlab::AppLogger,
Gitlab::ProductionLogger, Gitlab::SidekiqLogger, Gitlab::ProductionLogger, Gitlab::SidekiqLogger,
Gitlab::RepositoryCheckLogger] Gitlab::RepositoryCheckLogger]
%ul.nav-links.log-tabs = render 'admin/background_jobs/head'
- loggers.each do |klass|
%li{ class: (klass == Gitlab::GitLogger ? 'active' : '') } %div{ class: (container_class) }
= link_to klass::file_name, "##{klass::file_name_noext}", %ul.nav-links.log-tabs
'data-toggle' => 'tab' - loggers.each do |klass|
.row-content-block %li{ class: (klass == Gitlab::GitLogger ? 'active' : '') }
To prevent performance issues admin logs output the last 2000 lines = link_to klass::file_name, "##{klass::file_name_noext}",
.tab-content 'data-toggle' => 'tab'
- loggers.each do |klass| .row-content-block
.tab-pane{ class: (klass == Gitlab::GitLogger ? 'active' : ''), To prevent performance issues admin logs output the last 2000 lines
id: klass::file_name_noext } .tab-content
.file-holder#README - loggers.each do |klass|
.file-title .tab-pane{ class: (klass == Gitlab::GitLogger ? 'active' : ''),
%i.fa.fa-file id: klass::file_name_noext }
= klass::file_name .file-holder#README
.pull-right .file-title
= link_to '#', class: 'log-bottom' do %i.fa.fa-file
%i.fa.fa-arrow-down = klass::file_name
Scroll down .pull-right
.file-content.logs = link_to '#', class: 'log-bottom' do
%ol %i.fa.fa-arrow-down
- klass.read_latest.each do |line| Scroll down
%li .file-content.logs
%p= line %ol
- klass.read_latest.each do |line|
%li
%p= line
...@@ -16,14 +16,10 @@ ...@@ -16,14 +16,10 @@
= link_to admin_builds_path, title: 'Builds' do = link_to admin_builds_path, title: 'Builds' do
%span %span
Builds Builds
= nav_link(controller: :logs) do = nav_link(controller: %w(background_jobs logs health_check)) do
= link_to admin_logs_path, title: 'Logs' do = link_to admin_background_jobs_path, title: 'Monitoring' do
%span %span
Logs Monitoring
= nav_link(controller: :health_check) do
= link_to admin_health_check_path, title: 'Health Check' do
%span
Health Check
= nav_link(controller: :broadcast_messages) do = nav_link(controller: :broadcast_messages) do
= link_to admin_broadcast_messages_path, title: 'Messages' do = link_to admin_broadcast_messages_path, title: 'Messages' do
%span %span
...@@ -32,10 +28,7 @@ ...@@ -32,10 +28,7 @@
= link_to admin_hooks_path, title: 'Hooks' do = link_to admin_hooks_path, title: 'Hooks' do
%span %span
Hooks Hooks
= nav_link(controller: :background_jobs) do
= link_to admin_background_jobs_path, title: 'Background Jobs' do
%span
Background Jobs
= nav_link(controller: :appearances) do = nav_link(controller: :appearances) do
= link_to admin_appearances_path, title: 'Appearances' do = link_to admin_appearances_path, title: 'Appearances' do
%span %span
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment