mirror of
https://github.com/FAUSheppy/icinga-webhook-gateway
synced 2025-12-07 16:01:38 +01:00
wip:
This commit is contained in:
@@ -155,6 +155,21 @@ body{
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.smart-info{
|
||||||
|
font-family: monospace;
|
||||||
|
|
||||||
|
padding-top: 2px;
|
||||||
|
padding-top: 2px;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-left: 5px;
|
||||||
|
|
||||||
|
color: black;
|
||||||
|
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.box{
|
.box{
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
|
|||||||
@@ -33,11 +33,6 @@
|
|||||||
<h2 class="service-name">Service: {{ service.service }}</h2>
|
<h2 class="service-name">Service: {{ service.service }}</h2>
|
||||||
{% if service.staticly_configured %}
|
{% if service.staticly_configured %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if service.special_type == "SMART" %}
|
|
||||||
<div class="service-info-button mt-3" style="background-color: orange;">
|
|
||||||
Smart Monitor {% if smart_entry %} for: {{ smart.model_number }} {% endif %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if not service.staticly_configured %}
|
{% if not service.staticly_configured %}
|
||||||
<a class="service-info-button mt-3" style="background-color: orange;"
|
<a class="service-info-button mt-3" style="background-color: orange;"
|
||||||
@@ -76,8 +71,39 @@
|
|||||||
class="service-token">Secret Token: {{ service.token }}</div>
|
class="service-token">Secret Token: {{ service.token }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if service.special_type == "SMART" %}
|
||||||
|
<div class="clear smart-info mt-3" style="background-color: orange;">
|
||||||
|
Smart Monitor {% if smart %} for: {{ smart.model_number }} {% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="clear smart-info mt-3" style="background-color: orange;">
|
||||||
|
Example below requires smartmontools ("smartctl") in PATH.
|
||||||
|
On Linux this is usually available via the package manager,
|
||||||
|
on Windows install it from the
|
||||||
|
<a style="text-decoration: underline; color: #5000e1; font-weight: bold;" href="https://www.smartmontools.org/wiki/Download#InstalltheWindowspackage">offical page</a>.
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if smart %}
|
||||||
|
<h5 class="clear my-4">Linux</h5>
|
||||||
|
{% else %}
|
||||||
<h5 class="clear my-4">Curl</h5>
|
<h5 class="clear my-4">Curl</h5>
|
||||||
|
{% endif %}
|
||||||
<div class="ml-3 example">
|
<div class="ml-3 example">
|
||||||
|
{% if smart %}
|
||||||
|
SMART='{ <br>
|
||||||
|
<div class="example-indent">
|
||||||
|
"service" : "{{ service.service }}", <br>
|
||||||
|
"token" : "{{ service.token }}", <br>
|
||||||
|
"status" : "N/A", <br>
|
||||||
|
"smart" : '$(/sbin/smartctl -a /dev/nvme0n1 --json)' <br>
|
||||||
|
</div>
|
||||||
|
}' <br><br>
|
||||||
|
curl -X POST -H "Content-Type: application/json" \ <br>
|
||||||
|
<div class="example-indent">
|
||||||
|
--data "${SMART}" \ <br>
|
||||||
|
{{ flask.request.url_root.replace("http://", "https://" )}}report
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
curl -X POST \ <br>
|
curl -X POST \ <br>
|
||||||
<div class="example-indent">
|
<div class="example-indent">
|
||||||
-H "Content-Type: application/json" \ <br>
|
-H "Content-Type: application/json" \ <br>
|
||||||
@@ -86,6 +112,7 @@
|
|||||||
"status" : "OK", "info" : "Free Text Information here" }' \<br>
|
"status" : "OK", "info" : "Free Text Information here" }' \<br>
|
||||||
{{ flask.request.url_root.replace("http://", "https://" )}}report
|
{{ flask.request.url_root.replace("http://", "https://" )}}report
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h5 class="my-4">Python</h5>
|
<h5 class="my-4">Python</h5>
|
||||||
|
|||||||
Reference in New Issue
Block a user