Skip to content

Instantly share code, notes, and snippets.

@aarsla
Created July 26, 2016 12:44
Show Gist options
  • Save aarsla/9bcb16e2f85dcd7a5bd2d85e8f63978c to your computer and use it in GitHub Desktop.
Save aarsla/9bcb16e2f85dcd7a5bd2d85e8f63978c to your computer and use it in GitHub Desktop.
Elasticsearch Asterisk CDR Template
{
"order": 0,
"template": "cdr-*",
"settings": {
"index": {
"number_of_shards": "2",
"number_of_replicas": "1"
}
},
"mappings": {
"cdr": {
"properties": {
"dst": {
"type": "string"
},
"channel": {
"type": "string"
},
"lastdata": {
"type": "string"
},
"type": {
"type": "string"
},
"duration": {
"type": "long"
},
"dstchannel_name": {
"type": "string"
},
"path": {
"type": "string"
},
"userfield": {
"type": "string"
},
"@version": {
"type": "string"
},
"host": {
"type": "string"
},
"end": {
"format": "strict_date_optional_time||epoch_millis",
"type": "date"
},
"dstchannel_id": {
"type": "string"
},
"amaflags": {
"type": "string"
},
"billsec": {
"type": "long"
},
"uniqueid": {
"type": "string"
},
"dstchannel": {
"type": "string"
},
"channel_name": {
"type": "string"
},
"src": {
"type": "string"
},
"dcontext": {
"type": "string"
},
"start": {
"format": "strict_date_optional_time||epoch_millis",
"type": "date"
},
"clid": {
"type": "string"
},
"disposition": {
"type": "string"
},
"@timestamp": {
"format": "strict_date_optional_time||epoch_millis",
"type": "date"
},
"dstchannel_tech": {
"type": "string"
},
"channel_tech": {
"type": "string"
},
"lastapp": {
"type": "string"
},
"accountcode": {
"type": "string"
},
"channel_id": {
"type": "string"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment