This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CEPHADM="sudo cephadm" | |
echo '# `ceph -s`' | |
echo '```' | |
$CEPHADM shell -- ceph -s | |
echo '```' | |
echo '# `ceph health detail`' | |
echo '```' | |
$CEPHADM shell -- ceph health detail |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir /tmp/prometheus | |
cd /tmp/prometheus | |
curl -LO https://github.com/prometheus/prometheus/releases/download/v2.14.0/prometheus-2.14.0.linux-amd64.tar.gz | |
tar xf prometheus-2.14.0.linux-amd64.tar.gz | |
cd /tmp/prometheus/prometheus-2.14.0.linux-amd64 | |
# curl -LO https://raw.githubusercontent.com/ricardoasmarques/ceph-dev-docker/master/prometheus/prometheus.yml | |
# curl -LO https://raw.githubusercontent.com/ricardoasmarques/ceph-dev-docker/master/prometheus/alert.rules | |
echo "ddf47223ec716594254df110ee26ad52e66d7d4471ae8edbf9020087396861e5 prometheus-2.14.0.linux-amd64.tar.gz" > prometheus-2.14.0.linux-amd64.tar.gz.sha256 | |
sha256sum prometheus-2.14.0.linux-amd64.tar.gz.sha256 | |
if [[ "$?" != 0 ]] ; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# vim: ts=4 sts=4 sw=4 expandtab | |
from __future__ import absolute_import | |
import salt.client | |
import pdb | |
import re | |
from pprint import pprint | |
def hostnames(**kwargs): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/pybind/mgr/dashboard/controllers/host.py b/src/pybind/mgr/dashboard/controllers/host.py | |
index e7ba628717..693b80ccb1 100644 | |
--- a/src/pybind/mgr/dashboard/controllers/host.py | |
+++ b/src/pybind/mgr/dashboard/controllers/host.py | |
@@ -107,4 +107,9 @@ class Host(RESTController): | |
@RESTController.Resource('GET') | |
def smart(self, hostname): | |
# type: (str) -> dict | |
- return CephService.get_smart_data_by_host(hostname) | |
+ import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URL="https://raw.githubusercontent.com/ceph/ceph/24bae30bc67b47559a2f0d041aa2134ead6a4e78/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/smart-list/fixtures/smart_data_version_1_0_response.json" | |
curl -s $URL | jq -M '.["WDC_WD1003FBYX-01Y7B1_WD-WCAW11111111"]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts (revision 07a6e310dd6ab346854f32492b5ee0b33828aad8) | |
+++ src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts (date 1570462990761) | |
@@ -2,6 +2,8 @@ | |
import { Injectable } from '@angular/core'; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/pybind/mgr/dashboard/controllers/osd.py | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- src/pybind/mgr/dashboard/controllers/osd.py (date 1568804320000) | |
+++ src/pybind/mgr/dashboard/controllers/osd.py (date 1568813850316) | |
@@ -6,6 +6,7 @@ | |
from ..services.ceph_service import CephService, SendCommandError | |
from ..services.exception import handle_send_command_error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cd src/pybind/mgr/dashboard/frontend | |
if ! npx pretty-quick --pattern "{src,e2e}/**/*.{ts,scss}" --branch HEAD --check | |
then | |
echo "Ooops, you need to format frontend files." | |
exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import | |
import json | |
from contextlib import contextmanager | |
import cherrypy | |
from . import ApiController, RESTController, AuthRequired | |
from ..settings import Settings, Options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MGR_MODULES_DIR=$(dirname $GIT_DIR)/src/pybind/mgr/ | |
echo "find ${MGR_MODULES_DIR} -iname '*.pyc' -delete" | |
find ${MGR_MODULES_DIR} -iname '*.pyc' -delete |