Skip to content

Commit 737188e

Browse files
committed
.
1 parent 95fb0c0 commit 737188e

3 files changed

Lines changed: 45 additions & 84 deletions

File tree

.github/workflows/install-cacti.yml renamed to .github/workflows/install-syslog-cacti.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,23 @@ jobs:
197197
exit 1
198198
fi
199199
200+
- name: Populate Syslog Test Data
201+
run: |
202+
chmod +x ${{ github.workspace }}/cacti/plugins/syslog/.github/workflows/populate_syslog_incoming.sh
203+
cd ${{ github.workspace }}/cacti/plugins/syslog/.github/workflows
204+
./populate_syslog_incoming.sh
205+
206+
207+
- name: force Syslog Plugin Poller
208+
run: |
209+
cd ${{ github.workspace }}/cacti
210+
sudo php plugins/syslog/syslog_process.php --debug
211+
if ! grep -q "SYSTEM SYSLOG STATS" log/cacti.log; then
212+
echo "Syslog plugin poller did not finish successfully"
213+
cat log/cacti.log
214+
exit 1
215+
fi
216+
200217
- name: Test Syslog Plugin Functions
201218
run: |
202219
cd ${{ github.workspace }}/cacti/plugins/syslog

.github/workflows/php-syntax.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
# filepath: insert_syslog_test_data.sh
3+
4+
# Number of iterations
5+
ITERATIONS=100
6+
7+
# SQL statement to execute
8+
SQL_INSERT="INSERT INTO syslog_incoming (facility_id, priority_id, program, logtime, host, message, status) VALUES
9+
(1, 1, 'app1', NOW(), 'bob', 'interface down', 0),
10+
(2, 3, 'app2', NOW(), 'alice', 'cpu high', 1),
11+
(1, 2, 'app1', NOW(), 'router_1', 'the box exploded', 0);"
12+
13+
echo "Starting insert of $ITERATIONS batches (30,000 total records)..."
14+
echo "Start time: $(date)"
15+
16+
# Loop and insert
17+
for i in $(seq 1 $ITERATIONS); do
18+
mysql -u root -e "$SQL_INSERT"
19+
20+
# Show progress every 100 iterations
21+
if [ $((i % 100)) -eq 0 ]; then
22+
echo "Progress: $i / $ITERATIONS batches inserted"
23+
fi
24+
done
25+
26+
echo "Completed!"
27+
echo "End time: $(date)"
28+
echo "Total records inserted: $((ITERATIONS * 3))"

0 commit comments

Comments
 (0)