Skip to content
Snippets Groups Projects
Commit 7e1a71df authored by Tibo's avatar Tibo
Browse files

Send disks usage

parent 0ca304b8
No related branches found
No related tags found
No related merge requests found
......@@ -10,10 +10,10 @@ use Symfony\Component\Process\Exception\ProcessFailedException;
*
* @author tibo
*/
class Updates implements SensorInterface {
class Disks implements SensorInterface {
public function run() {
$process = new Process('cat /var/lib/update-notifier/updates-available');
$process = new Process('df');
$process->run();
return $process->getOutput();
......
......@@ -10,10 +10,10 @@ use Symfony\Component\Process\Exception\ProcessFailedException;
*
* @author tibo
*/
class Updates implements SensorInterface {
class Inodes implements SensorInterface {
public function run() {
$process = new Process('cat /var/lib/update-notifier/updates-available');
$process = new Process('df -i');
$process->run();
return $process->getOutput();
......
......@@ -57,7 +57,9 @@ class PingCommand extends Command {
$sensors = [
"loadavg" => LoadAvg::class,
"reboot" => Reboot::class,
"updates" => Updates::class
"updates" => Updates::class,
"disks" => Disks::class,
"inodes" => Inodes::class
];
foreach ($sensors as $key => $sensor_class) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment