[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [mosquitto-dev] Implementing health check for containerized MQTT server application? | 
  
  
    While I agree that this is a way of
      monitoring a device, in this case what I'm thinking about is a
      container health check.  This is a command that runs from within
      the container that Docker calls and expects a 0 return code for
      success or not for failure.  So I don't think an ongoing process
      confirming regular updates is the concept.  Also if the process
      inside the container is alive and running properly but the MQTT
      message broker outside the container is not I'm not sure that the
      container health check should fail in that situation, but a health
      check on the message broker container certainly should.
    
    
    Steve
    
    
    
    On 7/24/2022 1:05 AM, Dustin Sallings
      wrote:
    
    
      
      
        
          
          
          The device can self-report which also helps discovery. 
            Generate a unique topic and just publish to it regularly. 
            If you stop seeing updates, something might be wrong.  You
            can also use an LWT for reporting connection state.
          
          
          It's possible to do RPC-via-MQTT as well (I use this to
            rendezvous with an application I can't connect directly to. 
            In my case, the client generates a temporary topic and sends
            it as a response topic along with a correlation ID.  This is
            a heavier use case, though (I use it to synchronize a
            database).