This document is to help third party clients who wants to integrate Delfin into their Storage Management system
Delfin and its features/services are configured using configuration file <delfin source path>/etc/delfin/delfin.conf
.
Important configurations that users want change may be,
Category | Name | Default value | Description |
---|---|---|---|
DEFAULT | api_paste_config | /etc/delfin/api-paste.ini | Python Paste config file |
delfin_cryptor | delfin.cryptor._Base64 | Encryption/Decryption algorithm module to use | |
api_max_limit | 1000 | Max API connections | |
performance_exporters | PerformanceExporterPrometheus, PerformanceExporterKafka | Uncomment to enable Performance Exporters | |
alert_exporters | AlertExporterPrometheus | Uncomment to enable Alert Exporters | |
database | connection | sqlite:////var/delfin/delfin.sqlite | Database file |
db_backend | sqlalchemy | DB backend module | |
TELEMETRY | performance_collection_interval | 900 | Metrics collection interval |
KAFKA_EXPORTER | kafka_topic_name | “delfin-kafka” | KAFKA topic name |
kafka_ip | ‘<KAFKA_IP>’ | KAFKA installations IP | |
kafka_port | ‘9092’ | KAFKA installations PORT | |
PROMETHEUS_EXPORTER | metric_server_ip | 0.0.0.0 | PROMETHEUS IP |
metric_server_port | 8195 | PROMETHEUS PORT | |
metrics_cache_file | /var/lib/delfin/delfin_exporter.txt | Metrics files | |
PROMETHEUS_ALERT_MANAGER_EXPORTER | alert_manager_host | ‘<AlertManager_IP>’ | Alert Manager IP |
alert_manager_port | ‘9093’ | Alert Manager PORT | |
[DEFAULT]
api_paste_config = /etc/delfin/api-paste.ini
delfin_cryptor = delfin.cryptor._Base64
api_max_limit = 1000
# Uncomment or add exporters
# performance_exporters = PerformanceExporterPrometheus, PerformanceExporterKafka
# alert_exporters = AlertExporterPrometheus
[database]
connection = sqlite:////var/delfin.sqlite
db_backend = sqlalchemy
[TELEMETRY]
performance_collection_interval = 900
[KAFKA_EXPORTER]
kafka_topic_name = "delfin-kafka"
kafka_ip = '<Delfin_IP>'
kafka_port = '9092'
[PROMETHEUS_EXPORTER]
metric_server_ip = 0.0.0.0
metric_server_port = 8195
metrics_cache_file = /var/lib/delfin/delfin_exporter.txt
[PROMETHEUS_ALERT_MANAGER_EXPORTER]
alert_manager_host = '<Delfin_IP>'
alert_manager_port = '9093'
Detailed specification of REST APIs, Schemas and Requests/Responses are provided in the OpenAPI Spec
Here we are listing example CURL requests
Backend storage needs to be registered with Delfin for it to be managed. Delfin should be able to access backend storage using the information provided in the registration.
curl -X POST \
http://<Delfin_IP>:8190/v1/storages \
-H 'content-type: application/json' \
-d '{
"vendor":"fake_storage",
"model":"fake_driver",
"rest": {
"host":"127.0.0.1",
"port":22,
"username":"admin",
"password":"password"
}
}'
Backend storage can be removed from management by Delfin using delete API.
curl -X DELETE \
http://<Delfin_IP>:8190/v1/storages/<storage_id>
All Delfin registered storages details may be queried using this API
curl -X GET \
http://<Delfin_IP>:8190/v1/storages
Specific backend storage details can be retrieved using this API
curl -X GET \
http://<Delfin_IP>:8190/v1/storages/<storage_id>
If backend access information is changed, it can be updated to Delfin through this API
curl -X PUT \
http://<Delfin_IP>:8190/v1/storages/<storage_id>/access-info \
-H 'content-type: application/json' \
-d '{
"rest": {
"host": "10.0.0.1",
"port": 8008,
"username": "admin",
"password": "string"
}
}'
Current access information details of a storage can be retrieved using this API
curl -X GET \
http://<Delfin_IP>:8190/v1/storages/<storage_id>/access-info
Configure an alert source for the storage using this API
curl -X PUT \ http://<Delfin_IP>:8190/v1/storages/<storage_id>/alert-source \
-H 'content-type: application/json' \
-d '{
"version": "SNMPV2C",
"community_string": "string",
"username": "string",
"engine_id": "string",
"security_level": "noAuthnoPriv",
"auth_protocol": "MD5",
"auth_key": "string",
"privacy_protocol": "DES",
"privacy_key": "string",
"host": "10.0.0.1",
"context_name": "New Context",
"retry_num": 2,
"expiration": 60,
"port": 20162
}’
Current alert source information details of a storage can be retrieved using this API
curl -X GET \ http://<Delfin_IP>:8190/v1/storages/<storage_id>/alert-source
Delete the configured alert source information from the storage
curl -X DELETE \
http://<Delfin_IP>:8190/v1/storages/<storage_id>/alert-source
Lists all alerts in the storage from the specified interval
curl -X POST \
http://<Delfin_IP>:8190/v1/storages/<storage_id>/alerts -H 'content-type: application/json' \
-d '{
"begin_time": "13577777777777766",
"end_time": "13577777777777776"
}’
Delete the specified alert from backend storage.
curl -X DELETE \
http://<Delfin_IP>:8190/v1/storages/<storage_id>/alerts/<alert_seq_no>
Syncs resources information from specified backend storage to Delfin
curl -X POST \ http://<Delfin_IP>:8190/v1/storages/<storage_id>/sync
Syncs resources information from all backend storages to Delfin
curl -X POST \
http://<Delfin_IP>:8190/v1/storages/sync
Get resources (resources are, storage_pools, volumes, controllers, ports, disks) details from all the backend storages registered with Delfin. Example below shows getting disks resource details
curl -X GET \
http://<Delfin_IP>:8190/v1/disks
Get resources (resources are, storage_pools, volumes, controllers, ports, disks) details from specified backend storages registered with Delfin. Example below shows getting disks resource details
curl -X GET \
http://<Delfin_IP>:8190/v1/disks/<disk_id>
After successful registration of a storage Delfin will automatically starts performance metrics collection. Delfin framework will call driver interface to get the capabilities of the storage for supported metrics. Delfin framework periodically call driver interface of collect metrics for performance metrics. Performance metrics collection interval can be configured from delfin configuration file as above.
The backends may support secure access, using SSL/TLS certificates.
Delfin drivers support specifying a certificate file or root certificate path while accessing backend storage. Also, Delfin drivers support reloading of certificate files if enabled, for supporting certificate expiry.
The file ‘delfin/ssl_utils.py’, has needed function prototypes that may be customized for the clients platform requirements.
Delfin supports custom exporters for metrics and resources so that the client platform can integrate and utilize Delfin features easily.
A Sample exporter implementation is provided in Delfin repo for reference. Also, documentation for writing custom exporters is provided below.