<!DOCTYPE html> <html> <head> </head> <body> <p>All'interno della directory /var/sec/chroot-httpd/tmp/red/server ci sono alcuni file con l'ID dei dispositivi RED.</p> <p>-rw-r–r– 1 root root 4705 Sep 16 16:25 red_config_A320086FD64F0F4<br />-rw-r–r– 1 root root 4701 Sep 16 16:25 red_config_A32009F3A854FF7<br />-rw-r–r– 1 root root 5671 Sep 16 16:25 red_config_A3200F4751D00F8<br />-rw-r–r– 1 root root 5704 Sep 16 16:25 red_config_A3200FA107E50D6<br />-rw-r–r– 1 root root 185 Sep 16 16:30 red_state_A320086FD64F0F4<br />-rw-r–r– 1 root root 181 Sep 16 16:30 red_state_A32009F3A854FF7<br />-rw-r–r– 1 root root 182 Sep 16 16:30 red_state_A3200F4751D00F8<br />-rw-r–r– 1 root root 182 Sep 16 16:30 red_state_A3200FA107E50D6</p> <p>Questi file contengono informazioni in real-time sullo stato dei vari RED:</p> <p>{"status":"online","signal_strength":"N/A","uplink":"WAN","linkstate":"","pid":"28520","<br />lastping":1474036277,"uplinkstate":0,"peer":"79.2.48.234","auto_deauthorization_state":"none"}</p> <p>Con PRTG eseguiamo uno script SSH con l'utente loginuser che identifica la stringa online e riportiamo il result code di PRTG:</p> <p>"0:100:RED is online"<br />"0:200:RED is offline"</p> <p>Gli script sono contenuti in questa directory:</p> <p>astaro:/var/prtg/scripts #</p> <p>Esempio di script per monitorare la connessione di Pompei:</p> <p>redstate_Pompei.sh</p> <p>#!/bin/bash<br />file="/var/sec/chroot-httpd/tmp/red/server/red_state_A3200FA107E50D6"<br />if grep -q online "$file"; then<br />echo "0:100:RED is online"<br />else<br />echo "2:200:RED is offline"<br />fi</p> <p> </p> </body> </html>
Subscribe
0 Comments
Oldest