| | |
| | | $relname = "UNKNOWN"; |
| | | } |
| | | $distver = $ver.$lts." ".$relname; |
| | | swriteln("Operating System: ".$distver."\n"); |
| | | } elseif(trim(file_get_contents('/etc/debian_version')) == '4.0') { |
| | | $distname = 'Debian'; |
| | | $distver = '4.0'; |
| | |
| | | } elseif (strstr(trim(file_get_contents('/etc/debian_version')), '7.0') || trim(file_get_contents('/etc/debian_version')) == 'wheezy/sid') { |
| | | $distname = 'Debian'; |
| | | $distver = 'Wheezy/Sid'; |
| | | $distid = 'debian70'; |
| | | $distid = 'debian60'; |
| | | $distbaseid = 'debian'; |
| | | } else { |
| | | $distname = 'Debian'; |
| | |
| | | $state = 'ok'; |
| | | |
| | | //* Fetch the data for all users |
| | | $dfData = shell_exec('repquota -au'); |
| | | $dfData = shell_exec('repquota -au 2>/dev/null'); |
| | | |
| | | //* Split into array |
| | | $df = explode("\n", $dfData); |
| | |
| | | } |
| | | |
| | | //** Fetch the data for all users |
| | | $dfData = shell_exec('repquota -ag'); |
| | | $dfData = shell_exec('repquota -ag 2>/dev/null'); |
| | | |
| | | //* split into array |
| | | $df = explode("\n", $dfData); |
| | |
| | | $state = 'ok'; |
| | | |
| | | /** Fetch the data of ALL devices into a array (needed for monitoring!) */ |
| | | $dfData = shell_exec('df -hT'); |
| | | $dfData = shell_exec('df -hT 2>/dev/null'); |
| | | |
| | | // split into array |
| | | $df = explode("\n", $dfData); |
| | |
| | | $data['output'] = shell_exec('tw_cli info c0'); |
| | | |
| | | $state = 'ok'; |
| | | if(is_array($data['output'])) { |
| | | foreach ($data['output'] as $item) { |
| | | if (strpos($item, 'RAID') !== false) { |
| | | if (strpos($item, ' VERIFYING ') !== false) { |
| | |
| | | $this->_setState($state, 'critical'); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | system('which iptables', $retval); // Debian, Ubuntu, Fedora |
| | | if ($retval === 0) { |
| | | /* Get the data of the log */ |
| | | $data['output'] = '<h2>iptables -S (ipv4)</h2>'.shell_exec('iptables -S'); |
| | | $data['output'] = '<h2>iptables -S (ipv4)</h2>'.shell_exec('iptables -S 2>/dev/null'); |
| | | |
| | | /* |
| | | * At this moment, there is no state (maybe later) |
| | |
| | | system('which ip6tables', $retval); // Debian, Ubuntu, Fedora |
| | | if ($retval === 0) { |
| | | /* Get the data of the log */ |
| | | $data['output'] .= '<br><h2>ip6tables -S (ipv6)</h2>'.shell_exec('ip6tables -S'); |
| | | $data['output'] .= '<br><h2>ip6tables -S (ipv6)</h2>'.shell_exec('ip6tables -S 2>/dev/null'); |
| | | |
| | | /* |
| | | * At this moment, there is no state (maybe later) |