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.

Example configuration

Below a simple configuration example. An answer to "All I need to know: is my machine is up..."

Good to know: the examples implicitly also check outbound connectivity to the internet and if your scheduler program is running

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

Your options

There are several ways to "talk" to the LazyNanny servers.
The LazyNanny servers expect the "I'm OK" messages to use POST HTTPS TLS1.1/2/3.
You may use Curl, Wget, Powershell or any other tool to accomplish this.


Option 1, 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 --data "object_id=<your object ID>"

eg.  

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

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


Option 2, 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 --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 --post-data "object_id=3348ivf3go-8016-660"

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


Option 3, 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', 'object_id=<your object ID>')"

eg.  

powershell -command "$cli = New-Object System.Net.WebClient;$cli.UploadString('https://tip2027def.lazynanny.com', '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 runs 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