Schedule scans
Scan each VLAN from cron or a systemd timer, so that the map stays current.
The data on the map comes from the last scan. Scan each VLAN at regular intervals, for example every 15 minutes.
Before you start
Log in the user that runs the scans, so that it has the configuration file. See Install the collector.
With cron
Add one line for each VLAN to the crontab of the user:
*/15 * * * * shellgraph scan --env Production --vlan app-10 >> /var/log/shellgraph-app-10.log 2>&1
With a systemd timer
Make the service file
/etc/systemd/system/shellgraph-scan@.service.[Unit] Description=ShellGraph scan of VLAN %i After=network-online.target Wants=network-online.target [Service] Type=oneshot User=shellgraph Environment=SHELLGRAPH_ENV=Production ExecStart=/usr/local/bin/shellgraph scan --env ${SHELLGRAPH_ENV} --vlan %iMake the timer file
/etc/systemd/system/shellgraph-scan@.timer.[Unit] Description=ShellGraph scan of VLAN %i every 15 minutes [Timer] OnBootSec=2min OnUnitActiveSec=15min RandomizedDelaySec=60 [Install] WantedBy=timers.targetLoad the files.
systemctl daemon-reloadStart the timer for each VLAN.
systemctl enable --now shellgraph-scan@app-10.timerLook at the result of the last scan.
journalctl -u shellgraph-scan@app-10.service -n 20