Initial Configuration
Learn how to quickly configure Spyctl to interact with your Spyderbat data
Prerequisites
Initial Configuration
In this section you will learn how to configure Spyctl to enable data retrieval from across your entire organization. To do so, you must first create an APISecret and then use that APISecret to set a Context. An APISecret encapsulates your Spyderbat API credentials; the Context specifies where Spyctl should look for data when interacting with the Spyderbat API (e.g., organization, cluster, machine, service, or container image).
Create an APISecret
An APISecret encapsulates your Spyderbat API credentials. You must create at least one APISecret in order for Spyctl to access your data via theSpyderbat API.
To create an APISecret, use an API key generated from the Spyderbat Console.
United States
https://api.spyderbat.com
Mumbai, India
https://api.mum.prod.spyderbat.com
Frankfurt, Germany
https://api.deu.prod.spyderbat.com
For most users, the API URL will be the one in the United States. If you are unsure which one applies to you, contact support@spyderbat.com.
Copy a generated API key and region-specific API URL into the following command:
For example:
Spyctl saves APISecrets in $HOME/.spyctl/.secrets/secrets
Set a Context
Contexts will let Spyctl know where to look for data. The broadest possible Context is organization-wide. This means that when you run Spyctl commands, the Spyderbat API will return results relevant to your entire organization.
For the --org
field in the following command you may supply the name of your organization which can be found in the top right of the Spyderbat Console or the organization UID which can be found in your web browser’s url when logged into the Spyderbat Console: https://app.spyderbat.com/app/org/UID/dashboard.
For example:
You can view your configuration by issuing the following command:
You should see something like this:
The global configuration file is located at $HOME/.spyctl/config
It is possible to create more specific contexts, such as a group of machines or a specific container image. You can think of the fields in your context as filters to limit your scope. Follow this link to learn more about contexts: Contexts
At this point you should now be able to run spyctl commands that utilize the Spyderbat API.
Last updated