|  |  | @@ -15,7 +15,7 @@ module Agents | 
            
            
              | 15 | 15 |        <<-MD | 
            
            
              | 16 | 16 |          The Mixpanel Agent checks for analytics data and returns how many times that event was triggerd. | 
            
            
              | 17 | 17 |   | 
            
            
              | 18 |  | -        Specify the **API Key** and the **Secret Key** for the mixpanel project that you are querying. If you want to filter events using property, it is necessary to specify the value. The **time** property is an *integer* and the interval can be ```minute```, ```day```, ```month```, ```year```. | 
            
            
              |  | 18 | +        Specify the **API Key** and the **Secret Key** for the mixpanel project that you are querying. If you want to filter events using property, it is necessary to specify the value. The **time** property is an *integer* and the interval can be ```minute```, ```day```, ```month```, ```year```. For automaticly checking if the agent is working, set a threshold with ```expected_update_period_in_days```. | 
            
            
              | 19 | 19 |   | 
            
            
              | 20 | 20 |        MD | 
            
            
              | 21 | 21 |      end | 
            
            
            
            
              |  |  | @@ -28,7 +28,8 @@ module Agents | 
            
            
              | 28 | 28 |          'time' => 24, | 
            
            
              | 29 | 29 |          'interval' => 'hour', | 
            
            
              | 30 | 30 |          'property' => "Page", | 
            
            
              | 31 |  | -        'value' => "home" | 
            
            
              |  | 31 | +        'value' => "home", | 
            
            
              |  | 32 | +        'expected_update_period_in_days' => 1 | 
            
            
              | 32 | 33 |        } | 
            
            
              | 33 | 34 |      end | 
            
            
              | 34 | 35 |   | 
            
            
            
            
              |  |  | @@ -47,7 +48,7 @@ module Agents | 
            
            
              | 47 | 48 |      MD | 
            
            
              | 48 | 49 |   | 
            
            
              | 49 | 50 |      def working? | 
            
            
              | 50 |  | -      received_event_without_error? && !recent_error_logs? | 
            
            
              |  | 51 | +      event_created_within?(interpolated['expected_update_period_in_days']) && !recent_error_logs? | 
            
            
              | 51 | 52 |      end | 
            
            
              | 52 | 53 |   | 
            
            
              | 53 | 54 |      def validate_options |