Merge branch 'master' into influxdb
This commit is contained in:
@@ -6,7 +6,7 @@ jobs:
|
||||
build:
|
||||
name: Build
|
||||
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)
|
||||
services:
|
||||
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
container: karalabe/xgo-1.13.x
|
||||
container: techknowlogick/xgo:go-1.13.x
|
||||
env:
|
||||
PROJECT_PATH: /go/src/github.com/analogj/scrutiny
|
||||
CGO_ENABLED: 1
|
||||
@@ -28,13 +28,16 @@ jobs:
|
||||
git --version
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Bump version
|
||||
id: bump_version
|
||||
uses: packagrio/action-bumpr-go@master
|
||||
with:
|
||||
version_bump_type: ${{ github.event.inputs.version_bump_type }}
|
||||
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
|
||||
run: |
|
||||
mkdir -p $(dirname "$PROJECT_PATH")
|
||||
@@ -50,19 +53,27 @@ jobs:
|
||||
cd $PROJECT_PATH
|
||||
make all
|
||||
|
||||
- name: Commit
|
||||
uses: EndBug/add-and-commit@v4 # You can change this to use a specific version
|
||||
with:
|
||||
# restore modified dir to GH workspace.
|
||||
cp -arf $PROJECT_PATH/. $GITHUB_WORKSPACE/
|
||||
|
||||
author_name: Jason Kulatunga
|
||||
author_email: jason@thesparktree.com
|
||||
cwd: ${{ env.PROJECT_PATH }}
|
||||
force: false
|
||||
signoff: true
|
||||
message: '(${{steps.bump_version.outputs.release_version}}) Automated packaging of release by Packagr'
|
||||
tag: ${{steps.bump_version.outputs.release_version}}
|
||||
- name: Commit Changes
|
||||
id: commit
|
||||
uses: packagrio/action-releasr-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 }}
|
||||
# - 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
|
||||
id: create_release
|
||||
@@ -181,23 +192,23 @@ jobs:
|
||||
asset_name: scrutiny-collector-metrics-linux-arm-7
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
# - name: Release Asset - Web - freebsd-amd64
|
||||
# id: upload-release-asset7
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
|
||||
# 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
|
||||
# asset_path: ${{ env.PROJECT_PATH }}/scrutiny-web-freebsd-amd64
|
||||
# asset_name: scrutiny-web-freebsd-amd64
|
||||
# asset_content_type: application/octet-stream
|
||||
# - name: Release Asset - Collector - freebsd-amd64
|
||||
# id: upload-release-asset8
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
|
||||
# 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
|
||||
# asset_path: ${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-freebsd-amd64
|
||||
# asset_name: scrutiny-collector-metrics-freebsd-amd64
|
||||
# asset_content_type: application/octet-stream
|
||||
- name: Release Asset - Web - windows-amd64
|
||||
id: upload-release-asset11
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
|
||||
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
|
||||
asset_path: /build/scrutiny-web-windows-4.0-amd64.exe
|
||||
asset_name: scrutiny-web-windows-4.0-amd64.exe
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Release Asset - Collector - windows-amd64
|
||||
id: upload-release-asset12
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
|
||||
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
|
||||
asset_path: /build/scrutiny-collector-metrics-windows-4.0-amd64.exe
|
||||
asset_name: scrutiny-collector-metrics-windows-4.0-amd64.exe
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
[](https://goreportcard.com/report/github.com/AnalogJ/scrutiny)
|
||||
[](https://github.com/AnalogJ/scrutiny/releases)
|
||||
|
||||
|
||||
WebUI for smartd S.M.A.R.T monitoring
|
||||
|
||||
> 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)
|
||||
|
||||
@@ -71,12 +72,12 @@ If you're using Docker, getting started is as simple as running the following co
|
||||
|
||||
```bash
|
||||
docker run -it --rm -p 8080:8080 \
|
||||
-v /run/udev:/run/udev:ro \
|
||||
--cap-add SYS_RAWIO \
|
||||
--device=/dev/sda \
|
||||
--device=/dev/sdb \
|
||||
--name scrutiny \
|
||||
analogj/scrutiny
|
||||
-v /run/udev:/run/udev:ro \
|
||||
--cap-add SYS_RAWIO \
|
||||
--device=/dev/sda \
|
||||
--device=/dev/sdb \
|
||||
--name scrutiny \
|
||||
analogj/scrutiny
|
||||
```
|
||||
|
||||
- `/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
|
||||
docker run -it --rm -p 8080:8080 \
|
||||
--name scrutiny-web \
|
||||
analogj/scrutiny:web
|
||||
--name scrutiny-web \
|
||||
analogj/scrutiny:web
|
||||
|
||||
docker run -it --rm \
|
||||
-v /run/udev:/run/udev:ro \
|
||||
--cap-add SYS_RAWIO \
|
||||
--device=/dev/sda \
|
||||
--device=/dev/sdb \
|
||||
-e SCRUTINY_API_ENDPOINT=http://SCRUTINY_WEB_IPADDRESS:8080 \
|
||||
--name scrutiny-collector \
|
||||
analogj/scrutiny:collector
|
||||
-v /run/udev:/run/udev:ro \
|
||||
--cap-add SYS_RAWIO \
|
||||
--device=/dev/sda \
|
||||
--device=/dev/sdb \
|
||||
-e SCRUTINY_API_ENDPOINT=http://SCRUTINY_WEB_IPADDRESS:8080 \
|
||||
--name scrutiny-collector \
|
||||
analogj/scrutiny:collector
|
||||
```
|
||||
|
||||
## 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.
|
||||
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
|
||||
```
|
||||
|
||||
@@ -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.
|
||||
|
||||
```
|
||||
```bash
|
||||
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:
|
||||
|
||||
```
|
||||
```bash
|
||||
DEBUG=true
|
||||
SCRUTINY_LOG_FILE=/tmp/web.log
|
||||
```
|
||||
|
||||
You can configure the log level and log file in the config file:
|
||||
|
||||
```
|
||||
```yml
|
||||
log:
|
||||
file: '/tmp/web.log'
|
||||
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:
|
||||
|
||||
```
|
||||
```bash
|
||||
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:
|
||||
|
||||
```
|
||||
```bash
|
||||
DEBUG=true
|
||||
COLLECTOR_LOG_FILE=/tmp/collector.log
|
||||
```
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM karalabe/xgo-1.13.x
|
||||
FROM techknowlogick/xgo:go-1.13.x
|
||||
|
||||
WORKDIR /go/src/github.com/analogj/scrutiny
|
||||
|
||||
|
||||
@@ -258,7 +258,6 @@ func (n *Notify) GenShoutrrrNotificationParams(shoutrrrUrl string) (string, *sho
|
||||
(*params)["title"] = subject
|
||||
case "slack":
|
||||
(*params)["title"] = subject
|
||||
(*params)["thumb_url"] = logoUrl
|
||||
case "smtp":
|
||||
(*params)["subject"] = subject
|
||||
case "standard":
|
||||
|
||||
Reference in New Issue
Block a user