- uuid: c2c162144c2d4c5491c8801193af4945
- uuid: 137f19e6e2dc4219b33553b812627bc2
- uuid: 4e3fb27f028e4c35b8c9fc43b11c07d7
template: 'OpenStack by HTTP'
name: 'OpenStack by HTTP'
Requests OpenStack API access token and discovers available OpenStack services using OpenStack Identity API by HTTP using script item and creates host prototypes for them.
Template uses OpenStack application credentials for authorization.
Zabbix currently supports OpenStack Nova service.
Read the template documentation prior to using this template.
You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback
Generated by official Zabbix template tool "Templator"
- uuid: 0518d08edbf2480abf15f4ef0e7a251a
name: 'Get access token and service catalog'
key: openstack.identity.auth
delay: '{$OPENSTACK.AUTH.INTERVAL}'
const request_path = '/v3/auth/tokens';
function checkParams(params) {
['api_url', 'app_cred_id', 'app_cred_secret'].forEach(function (field) {
if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
throw 'Required param is not set: ' + field + '.';
function getHttpData(url, params, app_cred_id, app_cred_secret) {
const request = new HttpRequest();
request.addHeader('Content-Type: application/json');
"application_credential": {
"secret": app_cred_secret
if (params['http_proxy']) {
request.setProxy(params['http_proxy'])
Zabbix.log(4, '[ Openstack Nova API ] Using http proxy: ' + params['http_proxy']);
const response = request.post(url, JSON.stringify(request_body));
Zabbix.log(4, '[ Openstack Identity API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
if (request.getStatus() !== 201) {
if (typeof (response.error && response.error.message) !== 'undefined') {
throw response.error.message;
throw 'Failed to receive data: invalid response status code. Check debug log for more information.';
return {'request': request, 'response': response};
function parseHttpData(http_data) {
const headers = http_data['request'].getHeaders(true);