You can follow any of the two approaches to send test events and verify your RudderStack installation:
- Bundled shell script
- RudderStack's HTTP API
Bundled shell script
The RudderStack GitHub repository contains a bundled shell script that generates test events. Clone the repository by running the following command:
git clone https://github.com/rudderlabs/rudder-server.git
Then, follow the steps below to send test events.
Step 1: Getting the source write key
RudderStack Open Source dashboard
If you have signed up for RudderStack Open Source, follow these steps to get the source write key:
- Set up a source and a destination in RudderStack.
- You can find the write key in the source details page, as shown:
Self-hosted control plane
If you are self-hosting RudderStack and have set up the control plane using the Control Plane Lite utility, you can obtain the source write key by following these steps:
- Set up a source and a destination.
- Note the write key associated with the source in the dashboard as shown:
Step 2: Sending test events
To send the test events, follow the steps listed in the sections below depending on your preferred setup choice:
For local setup
- Navigate to the folder where RudderStack is installed.
- Then, run the following command after replacing
<WRITE_KEY>
with the source write key obtained in the previous section, and<DATA_PLANE_URL>
with your data plane URL.
./scripts/generate-event <WRITE_KEY> <DATA_PLANE_URL>/v1/batch
An example is shown below:
For Docker setup
For a Dockerized setup, run the following command:
docker exec -ti \ <rudder-server-running-container-id> \ ./scripts/generate-event <WRITE_KEY> <DATA_PLANE_URL>/v1/batch
You can then check your destination to verify that the events are delivered.
If you supply an invalid source write key or data plane URL, you will get the following error:
Using the HTTP API
To send test events via the RudderStack HTTP API, follow these steps:
- Import this Postman collection.
- Edit the variables
source_write_key
anddata_plane_url
in this collection with your source write key and your data plane URL.
RudderStack uses Basic Authentication for authenticating all the HTTP requests. The HTTP Basic Authentication requires a user name and password where:
- The user name is the
source_write_key
- The password is an empty string (
""
)
Now you can send test API requests and verify if your installation is working as expected.
Contact us
If you come across any issues while sending test events to verify your RudderStack installation, you can contact us or start a conversation in our Slack community.