Getting Started

Adding devices when they boot

You can use the addHost API call to ensure that a device adds itself to monitoring upon startup. Providing the ability to self-register with your monitoring platform is essential when taking advantage of Amazon, Rackspace, and other clouds services, in which devices are provisioned automatically in response to load.

The following example provides a command constructed using the API you can add to the start up script of every device:

wget 'https://accountName.logicmonitor.com/santaba/rpc/addHost?hostName='Name.of.Host'&displayedAs='displayName.of.host'&agentId=13&c=demo&u=myusername&p=mypassword' 

Where you replace the example text as follows:

  • Replace accountName with the name of your account in both the URL and the c parameter
  • Replace the hostName parameter with the DNS or IP address of the device
  • Replace the displayedAs parameter with a unique display name for the device
  • Replace the agentId parameter with the Id of the collector you want to monitor the device
  • Replace the u parameter with your LogicMonitor username
  • Replace the p parameter with the password associated with your username.

You can proliferate this setting across datacenter devices using puppet, chef, or cfengine.

Note: A system can run this command at every startup. If the device already exists in monitoring, no action is taken.