diff --git a/config/install/monitoring.sensor_config.monitoring_git_dirty_tree.yml b/config/install/monitoring.sensor_config.monitoring_git_dirty_tree.yml
index e24c5d1..058b628 100644
--- a/config/install/monitoring.sensor_config.monitoring_git_dirty_tree.yml
+++ b/config/install/monitoring.sensor_config.monitoring_git_dirty_tree.yml
@@ -13,3 +13,4 @@ settings:
   branches_cmd: 'git rev-parse --symbolic --branches'
   actual_branch_cmd: 'git symbolic-ref HEAD --short'
   expected_branch: NULL
+  submodules_cmd: 'git submodule status --recursive'
diff --git a/config/schema/monitoring.schema.yml b/config/schema/monitoring.schema.yml
index f63ad85..21fd1b3 100644
--- a/config/schema/monitoring.schema.yml
+++ b/config/schema/monitoring.schema.yml
@@ -154,6 +154,9 @@ monitoring.settings.monitoring_git_dirty_tree:
     expected_branch:
       type: string
       label: 'Git branch'
+    submodules_cmd:
+      type: string
+      label: 'Check submodules command'
 
 monitoring.settings.monitoring_disappeared_sensors:
   type: monitoring.settings_base
diff --git a/src/Plugin/monitoring/SensorPlugin/GitDirtyTreeSensorPlugin.php b/src/Plugin/monitoring/SensorPlugin/GitDirtyTreeSensorPlugin.php
index 928b0fb..5ab056c 100644
--- a/src/Plugin/monitoring/SensorPlugin/GitDirtyTreeSensorPlugin.php
+++ b/src/Plugin/monitoring/SensorPlugin/GitDirtyTreeSensorPlugin.php
@@ -39,6 +39,7 @@ class GitDirtyTreeSensorPlugin extends SensorPluginBase implements ExtendedInfoS
   protected $distance;
   protected $branches;
   protected $actualBranch;
+  protected $submodules;
 
   /**
    * {@inheritdoc}
@@ -61,15 +62,36 @@ class GitDirtyTreeSensorPlugin extends SensorPluginBase implements ExtendedInfoS
     }
     $this->status = $this->runSensorCommand($result, 'status_cmd');
     $this->distance = $this->runSensorCommand($result, 'ahead_cmd');
+    $this->submodules = $this->runSensorCommand($result, 'submodules_cmd');
+
+    $wrong_submodules = [];
+    foreach ($this->submodules as $submodule) {
+      $prefix = substr($submodule, 0, 1);
+      if ($prefix == '-' || $prefix == '+') {
+        $wrong_submodules[] = $submodule;
+      }
+    }
 
-    $result->setExpectedValue(0);
     $is_expected_branch = $this->actualBranch === $this->sensorConfig->getSetting('expected_branch');
-    if ($this->status || $this->distance || (!$is_expected_branch && $branch_control)) {
-      $result->setValue(count($this->status));
+    if ($this->status || $this->distance || (!$is_expected_branch && $branch_control) || $wrong_submodules) {
+
+      // Critical situations.
       if ($this->status) {
-        $result->addStatusMessage('Files in unexpected state: @files', array('@files' => $this->getShortFileList($this->status, 2)));
+        $result->addStatusMessage('@num_files files in unexpected state: @files', array(
+          '@num_files' => count($this->status),
+          '@files' => $this->getShortFileList($this->status),
+          ));
+        $result->setStatus(SensorResultInterface::STATUS_CRITICAL);
+      }
+      if ($wrong_submodules) {
+        $result->addStatusMessage('@num_submodules submodules in unexpected state: @submodules', array(
+          '@num_submodules' => count($wrong_submodules),
+          '@submodules' => $this->getShortFileList($wrong_submodules),
+          ));
         $result->setStatus(SensorResultInterface::STATUS_CRITICAL);
       }
+
+      // Warnings.
       if ($this->distance) {
         $result->addStatusMessage('Branch is @distance ahead of origin', array('@distance' => count($this->distance)));
         if ($result->getStatus() != SensorResultInterface::STATUS_CRITICAL) {
@@ -87,7 +109,6 @@ class GitDirtyTreeSensorPlugin extends SensorPluginBase implements ExtendedInfoS
       }
     }
     else {
-      $result->setValue(0);
       $result->addStatusMessage('Git repository clean');
       $result->setStatus(SensorResultInterface::STATUS_OK);
     }
@@ -170,8 +191,8 @@ class GitDirtyTreeSensorPlugin extends SensorPluginBase implements ExtendedInfoS
     );
     $output['status'] = array(
       '#type' => 'fieldset',
-      '#attributes' => array(),
       '#title' => t('Status'),
+      '#attributes' => array(),
     );
     $output['status']['cmd'] = array(
       '#type' => 'item',
@@ -185,6 +206,23 @@ class GitDirtyTreeSensorPlugin extends SensorPluginBase implements ExtendedInfoS
       '#description' => t('Shows uncommitted, changed and deleted files.'),
       '#description_display' => 'after',
     );
+    $output['submodules'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('Submodules'),
+      '#attributes' => array(),
+    );
+    $output['submodules']['cmd'] = array(
+      '#type' => 'item',
+      '#title' => t('Command'),
+      '#markup' => $this->buildCommand('submodules_cmd'),
+    );
+    $output['submodules']['output'] = array(
+      '#type' => 'item',
+      '#title' => t('Output'),
+      '#markup' => '<pre>' . implode("\n", $this->submodules) . '</pre>',
+      '#description' => t('Run "git submodule init" to initialize missing submodules ("-" prefix) or "git submodule update" to update submodules to the correct commit ("+" prefix).'),
+      '#description_display' => 'after',
+    );
 
     return $output;
   }
diff --git a/src/Tests/MonitoringCoreKernelTest.php b/src/Tests/MonitoringCoreKernelTest.php
index b602a70..60c9b18 100644
--- a/src/Tests/MonitoringCoreKernelTest.php
+++ b/src/Tests/MonitoringCoreKernelTest.php
@@ -436,6 +436,7 @@ class MonitoringCoreKernelTest extends MonitoringUnitTestBase {
     // http://unix.stackexchange.com/questions/48106/what-does-it-mean-to-have-a-dollarsign-prefixed-string-in-a-script.
     $sensor_config->settings['status_cmd'] = 'printf "A addedfile.txt\nM sites/all/modules/monitoring/test/tests/monitoring.core.test\nD deleted file.txt"';
     $sensor_config->settings['ahead_cmd'] = 'true';
+    $sensor_config->settings['submodules_cmd'] = 'true';
     $sensor_config->save();
 
     $result = $this->runSensor('monitoring_git_dirty_tree');
@@ -446,10 +447,8 @@ class MonitoringCoreKernelTest extends MonitoringUnitTestBase {
     $this->assertText('A addedfile.txt');
     $this->assertText('M sites/all/modules/monitoring/test/tests/monitoring.core.test');
     $this->assertText('D deleted file.txt');
-    // Three lines of cmd output.
-    $this->assertEqual($result->getValue(), 3);
     // Check if the sensor message has the expected value.
-    $this->assertEqual($result->getMessage(), 'Value 3, expected 0, Files in unexpected state: A addedfile.txt, M …modules/monitoring/test/tests/monitoring.core.test');
+    $this->assertEqual($result->getMessage(), '3 files in unexpected state: A addedfile.txt, M …modules/monitoring/test/tests/monitoring.core.test');
 
     // Now echo empty string.
     $sensor_config->settings['status_cmd'] = 'true';
@@ -458,7 +457,7 @@ class MonitoringCoreKernelTest extends MonitoringUnitTestBase {
     $result = $this->runSensor('monitoring_git_dirty_tree');
     $this->assertTrue($result->isOk());
     // The message should say that it is ok.
-    $this->assertEqual($result->getMessage(), 'Value 0, Git repository clean');
+    $this->assertEqual($result->getMessage(), 'Git repository clean');
 
     // Test 2 commits ahead of origin.
     $sensor_config->settings['ahead_cmd'] = 'printf "a4ea5e3ac5b7cca0c96aee4d00447c36121bd128\n299d85344fab9befbf6a275a4b64bda7b464b493"';
@@ -470,7 +469,7 @@ class MonitoringCoreKernelTest extends MonitoringUnitTestBase {
     $this->setRawContent(\Drupal::service('renderer')->renderPlain($verbose_output));
     $this->assertText('a4ea5e3ac5b7cca0c96aee4d00447c36121bd128');
     $this->assertText('299d85344fab9befbf6a275a4b64bda7b464b493');
-    $this->assertEqual($result->getMessage(), 'Value 0, Branch is 2 ahead of origin');
+    $this->assertEqual($result->getMessage(), 'Branch is 2 ahead of origin');
 
     // Test not in main branch.
     $sensor_config->settings['check_branch'] = TRUE;
@@ -484,7 +483,7 @@ class MonitoringCoreKernelTest extends MonitoringUnitTestBase {
     $verbose_output = $result->getVerboseOutput();
     $this->setRawContent(\Drupal::service('renderer')->renderPlain($verbose_output));
     $this->assertText('7.0.x');
-    $this->assertEqual($result->getMessage(), 'Value 0, Active branch 7.0.x, expected 8.0.x');
+    $this->assertEqual($result->getMessage(), 'Active branch 7.0.x, expected 8.0.x');
 
     // Test same as main branch.
     $sensor_config->settings['actual_branch_cmd'] = 'printf "8.0.x"';
@@ -492,7 +491,37 @@ class MonitoringCoreKernelTest extends MonitoringUnitTestBase {
 
     $result = $this->runSensor('monitoring_git_dirty_tree');
     $this->assertTrue($result->isOk());
-    $this->assertEqual($result->getMessage(), 'Value 0, Git repository clean');
+    $this->assertEqual($result->getMessage(), 'Git repository clean');
+
+    // Test submodule not initialized.
+    $sensor_config->settings['submodules_cmd'] = 'printf -- "-a5066d1778b9ec7c86631234ff2795e777bdff12 test\n156fff6ee58497fa22b57c32e22e3f13377b4120 test (8.x-1.0-240-g156fff6)"';
+    $sensor_config->save();
+
+    $result = $this->runSensor('monitoring_git_dirty_tree');
+    $this->assertTrue($result->isCritical());
+    $verbose_output = $result->getVerboseOutput();
+    $this->setRawContent(\Drupal::service('renderer')->renderPlain($verbose_output));
+    $this->assertText('-a5066d1778b9ec7c86631234ff2795e777bdff12 test');
+    $this->assertEqual($result->getMessage(), '1 submodules in unexpected state: -a5066d1778b9ec7c86631234ff2795e777bdff12 test');
+
+    // Test submodule with uncommitted changes.
+    $sensor_config->settings['submodules_cmd'] = 'printf "a5066d1778b9ec7c86631234ff2795e777bdff12 test\n+156fff6ee58497fa22b57c32e22e3f13377b4120 test (8.x-1.0-240-g156fff6)"';
+    $sensor_config->save();
+
+    $result = $this->runSensor('monitoring_git_dirty_tree');
+    $this->assertTrue($result->isCritical());
+    $verbose_output = $result->getVerboseOutput();
+    $this->setRawContent(\Drupal::service('renderer')->renderPlain($verbose_output));
+    $this->assertText('+156fff6ee58497fa22b57c32e22e3f13377b4120 test (8.x-1.0-240-g156fff6)');
+    $this->assertEqual($result->getMessage(), '1 submodules in unexpected state: +156fff6ee58497fa22b57c32e22e3f13377b4120 test (8.x-1.0-240-g156fff6)');
+
+    // Test submodules in expected state.
+    $sensor_config->settings['submodules_cmd'] = 'printf "a5066d1778b9ec7c86631234ff2795e777bdff12 test\n156fff6ee58497fa22b57c32e22e3f13377b4120 test (8.x-1.0-240-g156fff6)"';
+    $sensor_config->save();
+
+    $result = $this->runSensor('monitoring_git_dirty_tree');
+    $this->assertTrue($result->isOk());
+    $this->assertEqual($result->getMessage(), 'Git repository clean');
   }
 
   /**
