- Ceph Exporter: returns data on demand
- Prometheus: data collector
- Grafana: data visualizer
- Deploy ceph-exporter on host that has access to ceph
| --- | |
| - hosts: test | |
| remote_user: idc | |
| become: yes | |
| vars: | |
| LOGIN_FAIL_LOCK_SECS: 1800 | |
| LOGIN_FAIL_MAX_COUNT: 3 | |
| PASS_HIST: 3 | |
| PASS_MIN_LEN: 12 | |
| SSH_ALIVE_INTERVAL: 600 |
| autodetach on | |
| crlf off | |
| startup_message off | |
| shell -zsh | |
| defmonitor on | |
| activity "<%n>" | |
| caption always "%{= dd}%{+b ky}%{+ .b} $LOGNAME@%H %{-} %{.y}%-w%50>%{+ Kg} %n %t %{-}%+w%<%{-}" | |
| # 256 color support | |
| attrcolor b ".I" |
| #!/usr/bin/python3 | |
| import os | |
| import json | |
| from keystoneauth1.identity import v3 | |
| from keystoneauth1 import session | |
| import novaclient.client | |
| import cinderclient.client | |
| import config |
| #!/bin/bash | |
| for prj in $(jq -r .[] projects.json) | |
| do | |
| instance_uuids=$(openstack server list -f json --project $prj | jq -r ".[].ID") | |
| for instance_uuid in $instance_uuids | |
| do | |
| instance_json=$(openstack server show $instance_uuid -f json) | |
| echo $instance_json | jq '{uuid: .id, instance: ."OS-EXT-SRV-ATTR:instance_name", volumes: ."os-extended-volumes:volumes_attached"}' | |
| done |
csrutil disable
spctl kext-consent add G43BCU2T37
| function lanip() | |
| { | |
| ip -4 addr show en6 | awk '/inet/ { print $2; }' | awk -F/ '{ print $1; }' | |
| } | |
| function gw() { | |
| ip route | awk '/default/ { print $3; }' | |
| } | |
| function langw() |
| #!/bin/bash | |
| function port_neutron_obj { | |
| cat neutron_port.json | jq ".[] | select(.fixed_ips | contains(\"$1\"))" | |
| } | |
| function port_ovs_obj { | |
| IND_EXT_IDS=$(cat ovs_port.json | jq '.headings | index("external_ids")') | |
| IND_OFPORT=$(cat ovs_port.json | jq '.headings | index("ofport")') | |
| IND_DEVNAME=$(cat ovs_port.json | jq '.headings | index("name")') |
| javascript:(function confirmAsset($taskList_html = null) { | |
| let taskList_url = 'personalManagement.do?action=listPersonalTask'; | |
| jQuery.ajaxSetup({async:false}); | |
| if (!$taskList_html) | |
| $taskList_page = $(document); | |
| else | |
| $taskList_page = $($taskList_html); | |
| $.each($taskList_page.find('table#countTask1 tr td:nth-child(7) a'), function(i, elem) { | |
| let task = $taskList_page.find('table#countTask1 tr td:nth-child(2)')[i].innerHTML.split(/\s+/).join(' '); | |
| if (task == localStorage.getItem('task')) { |
| javascript:(function confirmAssetOnce() { | |
| $.each($('table#countTask1 tr td:nth-child(7) a'), function(i, elem) { | |
| task = $('table#countTask1 tr td:nth-child(2)')[i].innerHTML.split(/\s+/).join(' '); | |
| if (task == localStorage.getItem('task')) { | |
| location.reload(); | |
| return false; | |
| } | |
| localStorage.setItem('task', task); | |
| console.log(`working on ${task}`); | |
| $.get(elem.href, function(page) { |