Skip to content
Snippets Groups Projects
Verified Commit e4fdc182 authored by David Hoese's avatar David Hoese
Browse files

Add influxdb ingest script to scripts

parent 54cf52dc
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ def main():
'of the file and insert any new data added after starting'))
parser.add_argument('--ldmp', action='store_true',
help='Treat `src` file as a station name and read records from LoggerNet LDMP server (port: 1024)')
parser.add_argument('--tables', nargs='*', default=['RIGTower'],
parser.add_argument('--tables', nargs='*', default=['1'],
help="LoggerNet LDMP tables to read in")
parser.add_argument("--host", default=influxdb.DB_HOST,
help="Hostname of database connection")
......
#!/usr/bin/env bash
#
# Runs the tower ingest in a screen session named 'tower_influxdb_ingest'.
#
# If a screen session is already running with that name, exit, otherwise start
# a new detached screen session named 'tower_influxdb_ingest'.
#
NAME=tower_influxdb_ingest
PYENV=/opt/metobs/aoss_tower
#SRC=/mnt/data/ingest/rig_tower/rig_tower.dat
# LOGFN=$HOME/log/tower_db_ingest.log
# TODO: Add proper logging
SCRN=$(screen -list | grep $NAME | awk '{print $1}')
if [ -n "$SCRN" ]; then
echo Screen already running: $SCRN
else
screen -S $NAME -d -m $PYENV/bin/python -m aosstower.l00.influxdb --host metobs01.ssec.wisc.edu -vvv --ldmp RIGTower
#screen -S $NAME -d -m "$PYENV/bin/python -m aosstower.l00.influxdb --host metobs01.ssec.wisc.edu -vvv -t $SRC > /home/metobs/log/${NAME}.log"
echo Started in screen $(screen -list | grep $NAME | awk '{print $1}')
fi
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment