Probes¶
Probes are hooks that manipulate infrastructure before or after Sessions run. They are typically used for setup and cleanup tasks such as creating queues, flushing caches, scaling pods, truncating tables, or deleting data.
The QaaS.Common.Probes NuGet package ships the built-in probe library. You can author custom probes by implementing BaseProbe<TConfig> from QaaS.Framework.SDK.
| Package | QaaS.Common.Probes |
| Source | QaaS.Common.Probes |
| Depends on | QaaS.Framework.SDK |
Installation¶
Writing Custom Probes¶
See Write Hooks for the pattern.
Available Hooks¶
The built-in hooks below are grouped by usage area so it is easier to shortlist the right hook before drilling into configuration details.
RabbitMQ administration¶
- CreateRabbitMqBindings: Creates RabbitMQ bindings between exchanges and queues or between exchanges by using the configured binding definitions.
- DeleteRabbitMqBindings: Deletes RabbitMQ bindings using the configured source, destination, routing key, and binding type.
- DownloadRabbitMqDefinitions: Downloads RabbitMQ definitions from the management API so the current topology can be captured and reused.
- UploadRabbitMqDefinitions: Uploads a previously captured RabbitMQ definitions file back into the broker through the management API.
- CreateRabbitMqExchanges: Creates one or more RabbitMQ exchanges with the configured durability, auto-delete, and arguments.
- DeleteRabbitMqExchanges: Probe that deletes rabbitmq exchanges
- DeleteRabbitMqPermissions: Deletes RabbitMQ user permissions in one or more virtual hosts through the management API.
- UpsertRabbitMqPermissions: Creates or updates RabbitMQ permissions for users in one or more virtual hosts through the management API.
- CreateRabbitMqQueues: Creates one or more RabbitMQ queues with the configured queue arguments.
- DeleteRabbitMqQueues: Probe that deletes rabbitmq queues
- PurgeRabbitMqQueues: Probe that purges rabbitmq queues
- CreateRabbitMqUsers: Creates RabbitMQ users through the management API with the configured credentials and tags.
- DeleteRabbitMqUsers: Deletes RabbitMQ users through the management API.
- CreateRabbitMqVirtualHosts: Creates RabbitMQ virtual hosts through the management API so later probes and sessions can use them.
- DeleteRabbitMqVirtualHosts: Deletes RabbitMQ virtual hosts through the management API.
Redis maintenance¶
- ExecuteRedisCommand: Executes one Redis command with optional arguments against the selected Redis database, optionally storing the result for later redisResults placeholder reuse.
- ExecuteRedisCommands: Executes multiple Redis commands sequentially against the selected Redis database, allowing later commands to reuse earlier results through redisResults placeholders and optional looping.
- EmptyRedisByChunks: Concrete Redis chunk-deletion probe that uses the standard Redis batch probe configuration.
- FlushAllRedis: Runs Redis FLUSHALL against the configured server to remove keys from every database.
- FlushDbRedis: Runs Redis FLUSHDB against the selected Redis database.
Databases¶
- DeleteElasticIndices: Deletes every Elasticsearch index that matches the configured index pattern.
- EmptyElasticIndices: Empties elastic indices by their index pattern
- DropMongoDbCollection: Drops the configured MongoDB collection so a later run can recreate it from scratch.
- EmptyMongoDbCollection: Deletes all documents from the configured MongoDB collection so it starts clean for the test run.
- CreateS3Bucket: Ensures the configured S3 bucket exists by creating it when it is missing.
- DeleteS3Bucket: Probe to delete a s3 bucket
- EmptyS3Bucket: Probe to empty a s3 bucket according to a certain prefix
SQL maintenance¶
- MsSqlDataBaseTablesTruncate: Truncates the configured Microsoft SQL Server tables in the order they are listed.
- OracleSqlDataBaseTablesTruncate: Truncates the configured Oracle tables in the order they are listed.
- PostgreSqlDataBaseTablesTruncate: Truncates the configured PostgreSQL tables in the order they are listed.
Cluster orchestration¶
- OsEditYamlConfigMap: Probe that edits yaml config maps
- OsChangeDeploymentEnvVars: Probe that changes the environment variables of a deployment
- OsChangeStatefulSetEnvVars: Probe that changes the environment variables of a statefulSet
- OsUpdateDeploymentImage: Updates the image of one container in a Kubernetes or OpenShift deployment.
- OsUpdateStatefulSetImage: Updates the image of one container in a Kubernetes or OpenShift stateful set.
- OsExecuteCommandsInContainers: Probe that Executes a command passed by the
cmdstring variable on every pod and container if passed to the function - OsRestartPods: Probe that restarts all pods with configured labels in the configured namespace
- OsUpdateDeploymentResources: Updates container resource requests and limits in a Kubernetes or OpenShift deployment.
- OsUpdateStatefulSetResources: Updates container resource requests and limits in a Kubernetes or OpenShift stateful set.
- OsScaleDeploymentPods: Probe that scales openshift deployments
- OsScaleStatefulSetPods: Probe that scales openshift statefulsets