Skip to content

Commit 7873d7c

Browse files
committed
Update populate_syslog_incoming.sh
1 parent 943f4d6 commit 7873d7c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/populate_syslog_incoming.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ SQL_INSERT="INSERT INTO syslog_incoming (facility_id, priority_id, program, logt
1313
echo "Starting insert of $ITERATIONS batches (30,000 total records)..."
1414
echo "Start time: $(date)"
1515

16+
# MySQL connection parameters
17+
MYSQL_CMD="mysql -h 127.0.0.1 -u cactiuser -pcactiuser cacti"
18+
1619
# Loop and insert
1720
for i in $(seq 1 $ITERATIONS); do
18-
mysql -u root -e "$SQL_INSERT"
21+
$MYSQL_CMD -e "$SQL_INSERT"
1922

2023
# Show progress every 100 iterations
2124
if [ $((i % 100)) -eq 0 ]; then
@@ -26,3 +29,7 @@ done
2629
echo "Completed!"
2730
echo "End time: $(date)"
2831
echo "Total records inserted: $((ITERATIONS * 3))"
32+
33+
# Verify insertion
34+
echo "Verifying record count:"
35+
$MYSQL_CMD -e "SELECT COUNT(*) as total_records FROM syslog_incoming;"

0 commit comments

Comments
 (0)