Sign inSign up

datasentinel/datasentinel-agent

By datasentinel

•Updated over 3 years ago

Monitoring dockerized PostgreSQL clusters

Image
0

1.5K

datasentinel/datasentinel-agent repository overview

Datasentinel

⁠Datasentinel⁠ is a unique and innovative performance tool for Postgres. Explore all the features on our Live Demo⁠ site
⁠Docker image

Agent used to collect metrics from one or several PostgreSQL clusters

You need a valid license to be able to use the agent. You can request a 30-days Free Trial⁠. You will have at your disposal a Datasentinel SaaS platform. You can also install the platform on-premises or as a containerized app inside Docker

⁠How to use this image

Because the agent registers the server name and listening port to the platform, you need to expose them externally and pass the values when running a new agent. This allows the platform to communicate with the agent.

export DATASENTINEL_AGENT_HOST=172.16.250.199
export DATASENTINEL_AGENT_PORT=8383

docker run -d -p $DATASENTINEL_AGENT_PORT:$DATASENTINEL_AGENT_PORT -e DATASENTINEL_AGENT_HOST=$DATASENTINEL_AGENT_HOST -e DATASENTINEL_AGENT_PORT=$DATASENTINEL_AGENT_PORT datasentinel/datasentinel-agent 

⁠You can then use the API to configure the agent. See Agent API⁠

⁠Check agent status
curl -k https://${DATASENTINEL_AGENT_HOST}:${DATASENTINEL_AGENT_PORT}/api/agent/status
⁠Update token with valid license
export TOKEN="Valid license key"

cat <<EOF >body.json
{
    "value" : "$TOKEN"
}
EOF

curl -k --header 'Content-Type: application/json' --request PUT "https://${DATASENTINEL_AGENT_HOST}:${DATASENTINEL_AGENT_PORT}/api/server/token" -d @body.json
⁠Set Datasentinel upload platform
cat <<EOF >upload_server.json
{
  "host": "datasentinel_server",
  "port": 443
}
EOF

curl -k --header "api-token: $TOKEN" --header 'Content-Type: application/json' -X PUT https://${DATASENTINEL_AGENT_HOST}:${DATASENTINEL_AGENT_PORT}/api/server -d @upload_server.json
# Check upload server
curl -k -X GET https://${DATASENTINEL_AGENT_HOST}:${DATASENTINEL_AGENT_PORT}/api/server
⁠Test the communication between the agent and the platform
curl -k --header "api-token: $TOKEN" --request POST https://${DATASENTINEL_AGENT_HOST}:${DATASENTINEL_AGENT_PORT}/api/server/test-upload
⁠Add a PostgreSQL connection
cat > body.json <<EOF
{
  "host": "172.16.250.199",
  "port": 5432,
  "user": "datasentinel",
  "password": "myPassword",
  "tags": "application=application_name,environment=docker,datacenter=datacenter"
}
EOF

curl -k --header "api-token: $TOKEN" --header 'Content-Type: application/json' --request POST "https://${DATASENTINEL_AGENT_HOST}:${DATASENTINEL_AGENT_PORT}/api/connections/pg_docker_example" -d @body.json
⁠Check connection
curl -k --header "api-token: $TOKEN" -X GET https://${DATASENTINEL_AGENT_HOST}:${DATASENTINEL_AGENT_PORT}/api/connections

See Complete Documentation⁠


Active Session history


Top queries


Top tables

Tag summary

Content type

Image

Digest

sha256:2ec54b126…

Size

102.6 MB

Last updated

over 3 years ago

docker pull datasentinel/datasentinel-agent