Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion contrib/inventory-generation/load-database.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
database = 'rudder'
port_database = 5432

# on python 3, unicode is not there

# Use syslog rather than database
use_syslog = False
use_https = True
Expand Down Expand Up @@ -172,7 +174,7 @@ def store_config_id(regex):
if use_https:
try:
os.mkdir(report_path+nodeid)
except OSError, e:
except e:
if e.errno != os.errno.EEXIST:
raise
formatted_date = reportDate.strftime("%Y-%m-%dT%H:%M:%S+00:00")
Expand Down
3 changes: 2 additions & 1 deletion contrib/inventory-generation/sign-and-send-reports.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CLEAN="true"
DATA_PATH=$DIR/data
REPORTS_PATH=$DIR/reports
WEBDAV_PASS="rudder" # <- replace me
SERVER=""
UUID=""
ALL_INVENTORIES=false
Expand Down Expand Up @@ -117,7 +118,7 @@ function compress_and_sign {

mv "${SOURCE_FILE}.signed.gz" "${SOURCE_FILE}.gz"

curl --tlsv1.2 -k -s --fail --proxy '' --user "rudder:rudder" --upload-file "${SOURCE_FILE}.gz" https://${SERVER}/reports/ > /dev/null
curl --tlsv1.3 -k -s --fail --proxy '' --user "rudder:${WEBDAV_PASS}" --upload-file "${SOURCE_FILE}.gz" https://${SERVER}/reports/ > /dev/null

NB_REPORT_SENT=$((NB_REPORT_SENT+1))
if [ "${CLEAN}" = "true" ]
Expand Down