Register a Beacon
READ.md for the HelloHarborBeacon tells us the default beaconVersionId is
Select the Apps menu and then. and select our application
Click on the Beacons section below the app.
READ.md for the LinuxSysInfoBeacon tells us the default beaconVersionId is
Give the Beacon Version ID
You must make sure the Beacon Version ID matches the beaconVersionID in your Beacon. Otherwise, Hrbr will not accept the Beacon.
Finally, we need to configure our Beacon to send messages to our API Key and to our Application
To find your API Key click on your user avatar in the upper right-hand corner and select API Keys from the menu options.
For this Beacon there is a
index.js file we edit with our information. Edit with your favorite text editor to put in your API key and the
// You find your API key on the website by clicking on the icon with your avatar (far right of nav bar) then // selecting API Keys. Enter it here. const API_KEY = 'GET_YOUR_API-KEY_FROM_WEBSITE'; // Now you need to have a valid appVersionId. To get one, create an app in your account. appVersionId's use a naming // convention similar to a lot of bundle/docker ids which is a combination of RDNS and semantic versioning. Example: // io.hrbr.mycoolapp:1.0.0. Feel free to use the appVersionId shown below for this tutorial. const APP_VERSION_ID = 'io.hrbr.helloapp:1.0.0'; // You also need to have a beacon registered to your app in order for Hrbr to accept the post. Beacons have a // beaconVersionId which follows the same convention as the appVersionId, above. Let's use: io.hrbr.howdybeacon:1.0.0. // You will need to add this beacon to your app by going to the app details page on the website, then clicking + BEACON. // The beaconVersionId must match EXACTLY with what is below. const BEACON_VERSION_ID = 'io.hrbr.howdybeacon:1.0.0'; // Each Beacon can have any number of beaconMessageTypes (BMT). Some beacons send only one type. That's the case with this // example. A beacon message type is simply a string to help us identify different streams of monitoring data. Beacon Message // Types *do not* need to be pre-registered in order for Hrbr to accept the message. const BEACON_MESSAGE_TYPE = 'HELLO_HARBOR';
The Hello Harbor Beacon runs a standalone app so we'll need to start it to collect information. Go ahead and run
node . in the base directory for the Beacon.
And now you are sending your first messages to Hrbr. You can double check what's coming into Hrbr by selecting your app.
The you can select go to developer options. After waiting a few seconds you can see the Beacon messages.