Bootstrap FreeKB - ELK (Elastic Search, Logstash, Kibana) - List Locations using NodeJS
ELK (Elastic Search, Logstash, Kibana) - List Locations using NodeJS


ELK is the abbreviation for (Elastic Search, Logstash, Kibana) which is a system that parses log data from one or more systems and displays the log data in a web console, used for Observability, Alerting, Logging, and Monitoring.

NodeJS can be used to interact with ELK Kibana Synthetics. If you have not yet installed @elastic/synthetics in NodeJS, check out my article Install Elastic Synthetics in NodeJS.

The npx @elastic/synthetics locations command can be used to list the Elastic Synthetics public locations.

~]$ npx @elastic/synthetics locations
Public locations: 
   * japan
   * india
   * singapore
   * australia_east
   * united_kingdom
   * germany
   * canada_east
   * brazil
   * us_east
   * us_west
   
Set default location for monitors via
  - Synthetics config file 'monitors.locations' | 'monitors.privateLocations' field
  - Monitor API 'monitor.use({ locations: ["japan"], privateLocations: ["custom-location"] }')

 

If you have private locations, the The npx @elastic/synthetics locations command with the --url and --auth options can be used to list your private locations. You will pass your Kibana API key to the --auth option.

]$ npx @elastic/synthetics locations --url https://elk.kb.us-east-1.aws.elastic-cloud.com --auth abcdefg123456789abcdefg123456789abcdefg123456789abcdefg123==
Public locations: 
   * japan
   * india
   * singapore
   * australia_east
   * united_kingdom
   * germany
   * canada_east
   * brazil
   * us_east
   * us_west
   
Private locations: 
   * documaker-private-location
   * shs-private-location-1
   * shs-private-location-2
   * poc-private-location
   * shs-private-location-3
   * shs-private-location-4
   
Set default location for monitors via
  - Synthetics config file 'monitors.locations' | 'monitors.privateLocations' field
  - Monitor API 'monitor.use({ locations: ["japan"], privateLocations: ["custom-location"] }')

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter cd17f2 in the box below so that we can be sure you are a human.