Knowledge Base

Step 2 - Prepare your device

For LazyNanny to know that your object (device/service/application) is OK it will continuously (eg. every 5 minutes) need to receive "I'm OK" messages from your object. Some objects however are not internet connected/aware. You may have to use another device/server/PC/SBC to send the "I'm OK" message on behalf of the object you want to monitor.

Check-in protocol

The LazyNanny servers expect the "I'm OK" messages to use POST HTTPS TLS1.1/2.
You may use Curl, wget, powershell or any other tool to accomplish this.

Check-in configuration

Following configuration example on how to monitor your device ie. "All I need to know: is my machine is up..."
The examples implicitly also checks the folowing:

  • Outbound connectivity to the internet is available
  • Scheduler program is active
  • Device is up

Have a look here if "All I need to know: Does my machine have enough free disk space left..."

Examples on how to send the "I'm OK" message (aka check-in) to your LazyNanny server using

  • Curl (recommended)
  • Wget
  • Powershell

Using Curl (recommended)

Curl is a command line browser program that we will use for connecting to your LazyNanny server.
More information can be found here.

If not already available on your device:

  • Use your native package installer to install Curl (eg. yum, apt-get, etc.)
  • Select the correct platform version, download and install or unzip Curl on your internet connected device.
  • Take note of where the curl executable is located on the device eg. C:\Users\test\Downloads\curl-7.60.0-win64-mingw\bin\curl.exe
  • Need help to select what to download? Use the curl Download Wizard!

Example commandline for using Curl with "Object ID" and lazynanny-server (aka "Enterprise* - server location") on Windows.

<your directory path>\curl.exe https://<lazynanny-server>.lazynanny.com:15665 --data "object_id=<your object ID>"

eg.  

C:\Users\test\Downloads\curl-7.60.0-win64-mingw\bin\curl.exe https://tip2027def.lazynanny.com:15665 --data "object_id=3348ivf3go-8016-660"

Running this on your console will result in 200 OK if values are entered correctly.


Using wget

GNU Wget is a free software package for retrieving files using HTTPS, etc.
More information can be found here or here for Windows.

If not already available on your device:

  • Use your native package installer to install wget (eg. yum, apt-get, etc.)
  • Select the latest version, download or here for Windows and install wget on your internet connected device.
  • Take note of where the wget executable is located on the device eg. C:\Users\amon\Downloads\wget-1.11.4-1-bin\bin\wget.exe

Example commandline for using Wget on Windows.

<your directory path>\wget.exe https://<lazynanny-server>.lazynanny.com:15665 --post-data "object_id=<your object ID>"

eg.  

C:\Users\amon\Downloads\wget-1.11.4-1-bin\bin\wget.exe https://tip2027def.lazynanny.com:15665 --post-data "object_id=3348ivf3go-8016-660"

Running this on your console will result in 200 OK if values are entered correctly.


Using Windows Powershell

Commonly Windows powershell is already installed by default on your Windows machine. However not all required libraries may have been installed

powershell -command "$cli = New-Object System.Net.WebClient;$cli.UploadString('https://<lazynanny-server>.lazynanny.com:15665', 'object_id=<your object ID>')"

eg.  

powershell -command "$cli = New-Object System.Net.WebClient;$cli.UploadString('https://tip2027def.lazynanny.com:15665', 'object_id=3348ivf3go-8016-660')"

Running this in your Windows Command window will result in 200 OK if values are entered correctly.


Scheduler check-in frequency

Depending on your platform you may add one of the commands to your scheduler program. Set it run the command every 5 minutes.
For Windows you could use the Task Scheduler, for Linux and Unix platform equivalents you may use crontab. Have a look at this example for Linux/Unix and this for Windows.

*Free products Recipients default to account email address and default server location

Please rate this article to help us improve our Knowledge Base.

0 0