Merge branch 'master' into influxdb
This commit is contained in:
@@ -6,7 +6,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: karalabe/xgo-1.13.x
|
container: techknowlogick/xgo:go-1.13.x
|
||||||
|
|
||||||
# Service containers to run with `build` (Required for end-to-end testing)
|
# Service containers to run with `build` (Required for end-to-end testing)
|
||||||
services:
|
services:
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: karalabe/xgo-1.13.x
|
container: techknowlogick/xgo:go-1.13.x
|
||||||
env:
|
env:
|
||||||
PROJECT_PATH: /go/src/github.com/analogj/scrutiny
|
PROJECT_PATH: /go/src/github.com/analogj/scrutiny
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
@@ -28,13 +28,16 @@ jobs:
|
|||||||
git --version
|
git --version
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
- name: Bump version
|
- name: Bump version
|
||||||
id: bump_version
|
id: bump_version
|
||||||
uses: packagrio/action-bumpr-go@master
|
uses: packagrio/action-bumpr-go@master
|
||||||
with:
|
with:
|
||||||
version_bump_type: ${{ github.event.inputs.version_bump_type }}
|
version_bump_type: ${{ github.event.inputs.version_bump_type }}
|
||||||
version_metadata_path: ${{ github.event.inputs.version_metadata_path }}
|
version_metadata_path: ${{ github.event.inputs.version_metadata_path }}
|
||||||
github_token: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
mkdir -p $(dirname "$PROJECT_PATH")
|
mkdir -p $(dirname "$PROJECT_PATH")
|
||||||
@@ -50,19 +53,27 @@ jobs:
|
|||||||
cd $PROJECT_PATH
|
cd $PROJECT_PATH
|
||||||
make all
|
make all
|
||||||
|
|
||||||
- name: Commit
|
# restore modified dir to GH workspace.
|
||||||
uses: EndBug/add-and-commit@v4 # You can change this to use a specific version
|
cp -arf $PROJECT_PATH/. $GITHUB_WORKSPACE/
|
||||||
with:
|
|
||||||
|
|
||||||
author_name: Jason Kulatunga
|
- name: Commit Changes
|
||||||
author_email: jason@thesparktree.com
|
id: commit
|
||||||
cwd: ${{ env.PROJECT_PATH }}
|
uses: packagrio/action-releasr-go@master
|
||||||
force: false
|
|
||||||
signoff: true
|
|
||||||
message: '(${{steps.bump_version.outputs.release_version}}) Automated packaging of release by Packagr'
|
|
||||||
tag: ${{steps.bump_version.outputs.release_version}}
|
|
||||||
env:
|
env:
|
||||||
|
# This is necessary in order to push a commit to the repo
|
||||||
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged
|
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged
|
||||||
|
with:
|
||||||
|
version_metadata_path: ${{ github.event.inputs.version_metadata_path }}
|
||||||
|
# - name: Publish Release
|
||||||
|
# id: publish
|
||||||
|
# uses: packagrio/action-publishr-go@master
|
||||||
|
# env:
|
||||||
|
# # This is necessary in order to push a commit to the repo
|
||||||
|
# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged
|
||||||
|
# with:
|
||||||
|
# version_metadata_path: ${{ github.event.inputs.version_metadata_path }}
|
||||||
|
# upload_assets: '/build/scrutiny-web-linux-amd64 /build/scrutiny-collector-metrics-linux-amd64 /build/scrutiny-web-linux-arm64 /build/scrutiny-collector-metrics-linux-arm64 /build/scrutiny-web-linux-arm-5 /build/scrutiny-collector-metrics-linux-arm-5 /build/scrutiny-web-linux-arm-6 /build/scrutiny-collector-metrics-linux-arm-6 /build/scrutiny-web-linux-arm-7 /build/scrutiny-collector-metrics-linux-arm-7 /build/scrutiny-web-windows-4.0-amd64.exe /build/scrutiny-collector-metrics-windows-4.0-amd64.exe'
|
||||||
|
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
id: create_release
|
||||||
@@ -181,23 +192,23 @@ jobs:
|
|||||||
asset_name: scrutiny-collector-metrics-linux-arm-7
|
asset_name: scrutiny-collector-metrics-linux-arm-7
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
# - name: Release Asset - Web - freebsd-amd64
|
- name: Release Asset - Web - windows-amd64
|
||||||
# id: upload-release-asset7
|
id: upload-release-asset11
|
||||||
# uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
# env:
|
env:
|
||||||
# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
|
||||||
# with:
|
with:
|
||||||
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||||
# asset_path: ${{ env.PROJECT_PATH }}/scrutiny-web-freebsd-amd64
|
asset_path: /build/scrutiny-web-windows-4.0-amd64.exe
|
||||||
# asset_name: scrutiny-web-freebsd-amd64
|
asset_name: scrutiny-web-windows-4.0-amd64.exe
|
||||||
# asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
# - name: Release Asset - Collector - freebsd-amd64
|
- name: Release Asset - Collector - windows-amd64
|
||||||
# id: upload-release-asset8
|
id: upload-release-asset12
|
||||||
# uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
# env:
|
env:
|
||||||
# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
|
||||||
# with:
|
with:
|
||||||
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||||
# asset_path: ${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-freebsd-amd64
|
asset_path: /build/scrutiny-collector-metrics-windows-4.0-amd64.exe
|
||||||
# asset_name: scrutiny-collector-metrics-freebsd-amd64
|
asset_name: scrutiny-collector-metrics-windows-4.0-amd64.exe
|
||||||
# asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
|
|||||||
@@ -14,10 +14,11 @@
|
|||||||
[](https://goreportcard.com/report/github.com/AnalogJ/scrutiny)
|
[](https://goreportcard.com/report/github.com/AnalogJ/scrutiny)
|
||||||
[](https://github.com/AnalogJ/scrutiny/releases)
|
[](https://github.com/AnalogJ/scrutiny/releases)
|
||||||
|
|
||||||
|
|
||||||
WebUI for smartd S.M.A.R.T monitoring
|
WebUI for smartd S.M.A.R.T monitoring
|
||||||
|
|
||||||
> NOTE: Scrutiny is a Work-in-Progress and still has some rough edges.
|
> NOTE: Scrutiny is a Work-in-Progress and still has some rough edges.
|
||||||
|
>
|
||||||
|
> WARNING: Once the [InfluxDB](https://github.com/AnalogJ/scrutiny/tree/influxdb) branch is merged, Scrutiny will use both sqlite and InfluxDB for data storage. Unfortunately, this may not be backwards compatible with the database structures in the master (sqlite only) branch.
|
||||||
|
|
||||||
[](https://imgur.com/a/5k8qMzS)
|
[](https://imgur.com/a/5k8qMzS)
|
||||||
|
|
||||||
@@ -71,12 +72,12 @@ If you're using Docker, getting started is as simple as running the following co
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -it --rm -p 8080:8080 \
|
docker run -it --rm -p 8080:8080 \
|
||||||
-v /run/udev:/run/udev:ro \
|
-v /run/udev:/run/udev:ro \
|
||||||
--cap-add SYS_RAWIO \
|
--cap-add SYS_RAWIO \
|
||||||
--device=/dev/sda \
|
--device=/dev/sda \
|
||||||
--device=/dev/sdb \
|
--device=/dev/sdb \
|
||||||
--name scrutiny \
|
--name scrutiny \
|
||||||
analogj/scrutiny
|
analogj/scrutiny
|
||||||
```
|
```
|
||||||
|
|
||||||
- `/run/udev` is necessary to provide the Scrutiny collector with access to your device metadata
|
- `/run/udev` is necessary to provide the Scrutiny collector with access to your device metadata
|
||||||
@@ -94,17 +95,17 @@ In addition to the Omnibus image (available under the `latest` tag) there are 2
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -it --rm -p 8080:8080 \
|
docker run -it --rm -p 8080:8080 \
|
||||||
--name scrutiny-web \
|
--name scrutiny-web \
|
||||||
analogj/scrutiny:web
|
analogj/scrutiny:web
|
||||||
|
|
||||||
docker run -it --rm \
|
docker run -it --rm \
|
||||||
-v /run/udev:/run/udev:ro \
|
-v /run/udev:/run/udev:ro \
|
||||||
--cap-add SYS_RAWIO \
|
--cap-add SYS_RAWIO \
|
||||||
--device=/dev/sda \
|
--device=/dev/sda \
|
||||||
--device=/dev/sdb \
|
--device=/dev/sdb \
|
||||||
-e SCRUTINY_API_ENDPOINT=http://SCRUTINY_WEB_IPADDRESS:8080 \
|
-e SCRUTINY_API_ENDPOINT=http://SCRUTINY_WEB_IPADDRESS:8080 \
|
||||||
--name scrutiny-collector \
|
--name scrutiny-collector \
|
||||||
analogj/scrutiny:collector
|
analogj/scrutiny:collector
|
||||||
```
|
```
|
||||||
|
|
||||||
## Manual Installation (without-Docker)
|
## Manual Installation (without-Docker)
|
||||||
@@ -125,7 +126,7 @@ drive that Scrutiny detected. The collector is configured to run once a day, but
|
|||||||
For users of the docker Hub/Spoke deployment or manual install: initially the dashboard will be empty.
|
For users of the docker Hub/Spoke deployment or manual install: initially the dashboard will be empty.
|
||||||
After the first collector run, you'll be greeted with a list of all your hard drives and their current smart status.
|
After the first collector run, you'll be greeted with a list of all your hard drives and their current smart status.
|
||||||
|
|
||||||
```
|
```bash
|
||||||
docker exec scrutiny /scrutiny/bin/scrutiny-collector-metrics run
|
docker exec scrutiny /scrutiny/bin/scrutiny-collector-metrics run
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -164,7 +165,7 @@ Check the `notify.urls` section of [example.scrutiny.yml](example.scrutiny.yaml)
|
|||||||
|
|
||||||
You can test that your notifications are configured correctly by posting an empty payload to the notifications health check API.
|
You can test that your notifications are configured correctly by posting an empty payload to the notifications health check API.
|
||||||
|
|
||||||
```
|
```bash
|
||||||
curl -X POST http://localhost:8080/api/health/notify
|
curl -X POST http://localhost:8080/api/health/notify
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -175,14 +176,14 @@ Scrutiny provides various methods to change the log level to debug and generate
|
|||||||
|
|
||||||
You can use environmental variables to enable debug logging and/or log files for the web server:
|
You can use environmental variables to enable debug logging and/or log files for the web server:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
DEBUG=true
|
DEBUG=true
|
||||||
SCRUTINY_LOG_FILE=/tmp/web.log
|
SCRUTINY_LOG_FILE=/tmp/web.log
|
||||||
```
|
```
|
||||||
|
|
||||||
You can configure the log level and log file in the config file:
|
You can configure the log level and log file in the config file:
|
||||||
|
|
||||||
```
|
```yml
|
||||||
log:
|
log:
|
||||||
file: '/tmp/web.log'
|
file: '/tmp/web.log'
|
||||||
level: DEBUG
|
level: DEBUG
|
||||||
@@ -190,7 +191,7 @@ log:
|
|||||||
|
|
||||||
Or if you're not using docker, you can pass CLI arguments to the web server during startup:
|
Or if you're not using docker, you can pass CLI arguments to the web server during startup:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
scrutiny start --debug --log-file /tmp/web.log
|
scrutiny start --debug --log-file /tmp/web.log
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -198,14 +199,14 @@ scrutiny start --debug --log-file /tmp/web.log
|
|||||||
|
|
||||||
You can use environmental variables to enable debug logging and/or log files for the collector:
|
You can use environmental variables to enable debug logging and/or log files for the collector:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
DEBUG=true
|
DEBUG=true
|
||||||
COLLECTOR_LOG_FILE=/tmp/collector.log
|
COLLECTOR_LOG_FILE=/tmp/collector.log
|
||||||
```
|
```
|
||||||
|
|
||||||
Or if you're not using docker, you can pass CLI arguments to the collector during startup:
|
Or if you're not using docker, you can pass CLI arguments to the collector during startup:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
scrutiny-collector-metrics run --debug --log-file /tmp/collector.log
|
scrutiny-collector-metrics run --debug --log-file /tmp/collector.log
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM karalabe/xgo-1.13.x
|
FROM techknowlogick/xgo:go-1.13.x
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/analogj/scrutiny
|
WORKDIR /go/src/github.com/analogj/scrutiny
|
||||||
|
|
||||||
|
|||||||
@@ -258,7 +258,6 @@ func (n *Notify) GenShoutrrrNotificationParams(shoutrrrUrl string) (string, *sho
|
|||||||
(*params)["title"] = subject
|
(*params)["title"] = subject
|
||||||
case "slack":
|
case "slack":
|
||||||
(*params)["title"] = subject
|
(*params)["title"] = subject
|
||||||
(*params)["thumb_url"] = logoUrl
|
|
||||||
case "smtp":
|
case "smtp":
|
||||||
(*params)["subject"] = subject
|
(*params)["subject"] = subject
|
||||||
case "standard":
|
case "standard":
|
||||||
|
|||||||
Reference in New Issue
Block a user