-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
4,979 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.git | ||
.gitignore | ||
.idea | ||
build | ||
LICENSE | ||
README* | ||
VERSION |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Pull base image. | ||
FROM debian:jessie | ||
|
||
MAINTAINER Peter Sarossy <[email protected]> | ||
|
||
# Set environment. | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Install packages. | ||
RUN apt-get update | ||
RUN apt-get install -y curl mysql-client nano python python-mysqldb sqlite3 wget python-influxdb | ||
|
||
# Clean up APT when done. | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
# Define working directory. | ||
WORKDIR /opt/btmon | ||
|
||
# Add files to the container. | ||
ADD . /opt/btmon | ||
|
||
# Define volumes. | ||
VOLUME ["/etc/bind", "/var/lib/bind", "/var/run/named"] | ||
|
||
# Define the command script. | ||
CMD ["/bin/sh", "-c", "./btmon"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# btmon-influx | ||
btmon.py with influxdb support | ||
Btmon Docker Image w/ Influxdb | ||
============================== | ||
|
||
Docker image for running the btmon.py Brultech monitor script. | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# Exit with error if required environment is not present | ||
if [ -z "${BTMON_CONFIG}" ] || [ ! -f "${BTMON_CONFIG}" ]; then | ||
echo "Envrionment variable BTMON_CONFIG must be provided" | ||
exit 1 | ||
fi | ||
|
||
# Execute the btmon python script | ||
./btmon.py -c ${BTMON_CONFIG} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[source] | ||
device_type = gem | ||
ip_read = true | ||
ip_port = 5000 | ||
ip_mode = server | ||
include_current = true | ||
reverse_polarity = true | ||
full_serials = true | ||
|
||
[influxdb] | ||
influxdb_out = true | ||
influxdb_host = 10.0.0.72 | ||
influxdb_port = 8086 | ||
influxdb_upload_period = 10 | ||
influxdb_database = btmon | ||
influxdb_measurement = energy | ||
influxdb_mode = row | ||
influxdb_db_schema = ecmreadext |
Oops, something went wrong.