monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question regarding send/exprect test


From: S. Seide
Subject: Question regarding send/exprect test
Date: Wed, 6 Sep 2017 10:05:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

Hello,

currently i try to setup an generic tcp test for an mqtt server. The
protocol is simple but a binary one (1).

The following test send the correct CONNECT package to the server but i
did not manage to create a working expect string. Ist it possible or do
we need an nativ implementation of the protocol for a specific
connection test?


check process mosquitto with pidfile /var/run/mosquitto.pid
 if failed port 1883
  send "\0x10\0x16\0x00\0x04MQTT\0x04\0x02\0x00\0x02\0x00\0x05Monitoring"
  expect "\0x20\0x00\0x00\0x00"  # con ok
  send "\0xE0\0x00"              # disconnect
  then alert

other expected string may be connection refused/not authorized if auth
is required:
  expect "\0x20\0x00\0x00\0x05"


Thanks in advance,
S. Seide


(1) http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]