Skip to content

Commit

Permalink
Merge pull request #38 from negbie/master
Browse files Browse the repository at this point in the history
Sync
  • Loading branch information
negbie committed Apr 22, 2018
2 parents 358f748 + 0daca1b commit 27d59b1
Show file tree
Hide file tree
Showing 49 changed files with 729 additions and 527 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![image](https://user-images.githubusercontent.com/1423657/38167610-1bccc596-3538-11e8-944c-8bd9ee0433b2.png)

**heplify-server** is a stand-alone **HOMER** *Capture Server* developed in Go, optimized for speed and simplicity. Distributed as a single binary ready to capture TCP/TLS/UDP **HEP** encapsulated packets from [heplify](https://github.com/sipcapture/heplify) or any other [HEP](https://github.com/sipcapture/hep) enabled agent or platform, indexing to database using H5 or H7 table format, producing basic usage metrics timeseries and providing users with simple, basic options for correlation and tagging inline.
**heplify-server** is a stand-alone **HOMER** *Capture Server* developed in Go, optimized for speed and simplicity. Distributed as a single binary ready to capture TLS and UDP **HEP** encapsulated packets from [heplify](https://github.com/sipcapture/heplify) or any other [HEP](https://github.com/sipcapture/hep) enabled agent or platform, indexing to database using H5 or H7 table format, producing basic usage metrics timeseries and providing users with simple, basic options for correlation and tagging inline. **heplify-server** also supports protobuf so you don't have to write your own **HEP** implementation.

*TLDR; instant, stand-alone, minimal HOMER without Kamailio or OpenSIPS dependency/options.*

Expand Down
7 changes: 1 addition & 6 deletions cmd/heplify-server/heplify-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ import (
//"net"
//_ "net/http/pprof"

raven "github.com/getsentry/raven-go"
"github.com/koding/multiconfig"
"github.com/negbie/heplify-server/config"
"github.com/negbie/heplify-server/logp"
"github.com/negbie/heplify-server/server"
)

const version = "heplify-server 0.80"
const version = "heplify-server 0.86"

type server interface {
Run()
Expand Down Expand Up @@ -80,10 +79,6 @@ func main() {

//go http.ListenAndServe(":8181", http.DefaultServeMux)

if config.Setting.SentryDSN != "" {
raven.SetDSN(config.Setting.SentryDSN)
}

signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)
hep := input.NewHEP()
servers := []server{hep}
Expand Down
34 changes: 14 additions & 20 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,31 @@ package config
var Setting HeplifyServer

type HeplifyServer struct {
Network string `default:"udp"`
Protobuf bool `default:"false"`
Mode string `default:"homer5"`
HEPAddr string `default:"0.0.0.0:9060"`
HEPWorkers int `default:"100"`
MQName string `default:""`
MQDriver string `default:""`
MQAddr string `default:""`
MQTopic string `default:""`
PromAddr string `default:""`
PromTargetIP string `default:""`
PromTargetName string `default:""`
RTPAgent bool `default:"false"`
DBShema string `default:"homer5"`
DBDriver string `default:"mysql"`
DBAddr string `default:"localhost:3306"`
DBUser string `default:"root"`
DBPass string `default:""`
DBDataTable string `default:"homer_data"`
DBConfTable string `default:"homer_configuration"`
DBPath string `default:""`
DBTableSpace string `default:""`
DBBulk int `default:"200"`
DBTimer int `default:"2"`
DBRotate bool `default:"true"`
DBRotateLog string `default:"6h"`
DBRotateSip string `default:"2h"`
DBRotateQos string `default:"12h"`
DBPartLog string `default:"6h"`
DBPartSip string `default:"2h"`
DBPartQos string `default:"12h"`
DBDropDays int `default:"0"`
DBDropOnStart bool `default:"false"`
Dedup bool `default:"false"`
SentryDSN string `default:""`
AlegID string `default:"x-cid"`
LogDbg string `default:""`
LogLvl string `default:"info"`
Expand All @@ -41,34 +38,31 @@ type HeplifyServer struct {

func NewConfig() *HeplifyServer {
return &HeplifyServer{
Network: "udp",
Protobuf: false,
Mode: "homer5",
HEPAddr: "0.0.0.0:9060",
HEPWorkers: 100,
MQName: "",
MQDriver: "",
MQAddr: "",
MQTopic: "",
PromAddr: "",
PromTargetIP: "",
PromTargetName: "",
RTPAgent: false,
DBShema: "homer5",
DBDriver: "mysql",
DBAddr: "localhost:3306",
DBUser: "root",
DBPass: "",
DBDataTable: "homer_data",
DBConfTable: "homer_configuration",
DBPath: "",
DBTableSpace: "",
DBBulk: 200,
DBTimer: 2,
DBRotate: true,
DBRotateLog: "6h",
DBRotateSip: "2h",
DBRotateQos: "12h",
DBPartLog: "6h",
DBPartSip: "2h",
DBPartQos: "12h",
DBDropDays: 0,
DBDropOnStart: false,
Dedup: false,
SentryDSN: "",
AlegID: "x-cid",
LogDbg: "",
LogLvl: "info",
Expand Down
64 changes: 32 additions & 32 deletions database/database-packr.go

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ type DBHandler interface {
}

func New(name string) *Database {
if config.Setting.Mode == "homer5" {
if config.Setting.DBShema == "homer5" {
name += "Homer5"
} else if config.Setting.Mode == "homer7" {
} else if config.Setting.DBShema == "homer7" {
name += "Homer7"
}
var register = map[string]DBHandler{
Expand All @@ -43,10 +43,10 @@ func (d *Database) Run() error {
)

if config.Setting.DBDriver != "mysql" && config.Setting.DBDriver != "postgres" {
return fmt.Errorf("wrong database driver: %s, please use mysql or postgres", config.Setting.DBDriver)
return fmt.Errorf("Invalid database driver: %s, please use mysql or postgres", config.Setting.DBDriver)
}
if config.Setting.Mode != "homer5" && config.Setting.Mode != "homer7" {
return fmt.Errorf("wrong mode: %s, please use homer5 or homer7", config.Setting.Mode)
if config.Setting.DBShema != "homer5" && config.Setting.DBShema != "homer7" {
return fmt.Errorf("Invalid DBShema: %s, please use homer5 or homer7", config.Setting.DBShema)
}

err = d.DBH.setup()
Expand Down
13 changes: 8 additions & 5 deletions database/files/homer5/mysql/droptbl.sql
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
-- name: drop-logs-table
DROP TABLE logs_capture_all_TableDate;
DROP TABLE logs_capture_all_DayDate;

-- name: drop-report-table
DROP TABLE report_capture_all_TableDate;
DROP TABLE report_capture_all_DayDate;

-- name: drop-rtcp-table
DROP TABLE rtcp_capture_all_TableDate;
DROP TABLE rtcp_capture_all_DayDate;

-- name: drop-call-table
DROP TABLE sip_capture_call_TableDate;
DROP TABLE sip_capture_call_DayDate;

-- name: drop-registration-table
DROP TABLE sip_capture_registration_TableDate;
DROP TABLE sip_capture_registration_DayDate;

-- name: drop-rest-table
DROP TABLE sip_capture_rest_DayDate;
2 changes: 1 addition & 1 deletion database/files/homer5/mysql/parlog.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
-- name: create-partition-logs_capture
ALTER TABLE logs_capture_all_TableDate ADD PARTITION (PARTITION pPartitionName_pnr0000 VALUES LESS THAN ( UNIX_TIMESTAMP('StartTime') ));
ALTER TABLE logs_capture_all_DayDate ADD PARTITION (PARTITION DayDate_pnr0000 VALUES LESS THAN ( UNIX_TIMESTAMP('StartTime') ));
13 changes: 8 additions & 5 deletions database/files/homer5/mysql/parmax.sql
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
-- name: create-partitionmax-logs_capture
ALTER TABLE logs_capture_all_TableDate ADD PARTITION (PARTITION pmax VALUES LESS THAN MAXVALUE);
ALTER TABLE logs_capture_all_DayDate ADD PARTITION (PARTITION pmax VALUES LESS THAN MAXVALUE);

-- name: create-partitionmax-report_capture
ALTER TABLE report_capture_all_TableDate ADD PARTITION (PARTITION pmax VALUES LESS THAN MAXVALUE);
ALTER TABLE report_capture_all_DayDate ADD PARTITION (PARTITION pmax VALUES LESS THAN MAXVALUE);

-- name: create-partitionmax-rtcp_capture
ALTER TABLE rtcp_capture_all_TableDate ADD PARTITION (PARTITION pmax VALUES LESS THAN MAXVALUE);
ALTER TABLE rtcp_capture_all_DayDate ADD PARTITION (PARTITION pmax VALUES LESS THAN MAXVALUE);

-- name: create-partitionmax-sip_capture_call
ALTER TABLE sip_capture_call_TableDate ADD PARTITION (PARTITION pmax VALUES LESS THAN MAXVALUE);
ALTER TABLE sip_capture_call_DayDate ADD PARTITION (PARTITION pmax VALUES LESS THAN MAXVALUE);

-- name: create-partitionmax-sip_capture_registration
ALTER TABLE sip_capture_registration_TableDate ADD PARTITION (PARTITION pmax VALUES LESS THAN MAXVALUE);
ALTER TABLE sip_capture_registration_DayDate ADD PARTITION (PARTITION pmax VALUES LESS THAN MAXVALUE);

-- name: create-partitionmax-sip_capture_rest
ALTER TABLE sip_capture_rest_DayDate ADD PARTITION (PARTITION pmax VALUES LESS THAN MAXVALUE);
4 changes: 2 additions & 2 deletions database/files/homer5/mysql/parqos.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- name: create-partition-report_capture
ALTER TABLE report_capture_all_TableDate ADD PARTITION (PARTITION pPartitionName_pnr0000 VALUES LESS THAN ( UNIX_TIMESTAMP('StartTime') ));
ALTER TABLE report_capture_all_DayDate ADD PARTITION (PARTITION DayDate_pnr0000 VALUES LESS THAN ( UNIX_TIMESTAMP('StartTime') ));

-- name: create-partition-rtcp_capture
ALTER TABLE rtcp_capture_all_TableDate ADD PARTITION (PARTITION pPartitionName_pnr0000 VALUES LESS THAN ( UNIX_TIMESTAMP('StartTime') ));
ALTER TABLE rtcp_capture_all_DayDate ADD PARTITION (PARTITION DayDate_pnr0000 VALUES LESS THAN ( UNIX_TIMESTAMP('StartTime') ));
7 changes: 5 additions & 2 deletions database/files/homer5/mysql/parsip.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
-- name: create-partition-sip_capture_call
ALTER TABLE sip_capture_call_TableDate ADD PARTITION (PARTITION pPartitionName_pnr0000 VALUES LESS THAN ( UNIX_TIMESTAMP('StartTime') ));
ALTER TABLE sip_capture_call_DayDate ADD PARTITION (PARTITION DayDate_pnr0000 VALUES LESS THAN ( UNIX_TIMESTAMP('StartTime') ));

-- name: create-partition-sip_capture_registration
ALTER TABLE sip_capture_registration_TableDate ADD PARTITION (PARTITION pPartitionName_pnr0000 VALUES LESS THAN ( UNIX_TIMESTAMP('StartTime') ));
ALTER TABLE sip_capture_registration_DayDate ADD PARTITION (PARTITION DayDate_pnr0000 VALUES LESS THAN ( UNIX_TIMESTAMP('StartTime') ));

-- name: create-partition-sip_capture_rest
ALTER TABLE sip_capture_rest_DayDate ADD PARTITION (PARTITION DayDate_pnr0000 VALUES LESS THAN ( UNIX_TIMESTAMP('StartTime') ));
85 changes: 75 additions & 10 deletions database/files/homer5/mysql/tbldata.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- name: create-logs-table
CREATE TABLE IF NOT EXISTS `logs_capture_all_TableDate` (
CREATE TABLE IF NOT EXISTS `logs_capture_all_DayDate` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`micro_ts` bigint(18) NOT NULL DEFAULT '0',
Expand All @@ -18,11 +18,11 @@ CREATE TABLE IF NOT EXISTS `logs_capture_all_TableDate` (
KEY `correlationid` (`correlation_id`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
PARTITION BY RANGE ( UNIX_TIMESTAMP(`date`) ) (
PARTITION pPartitionName_pnr0 VALUES LESS THAN ( UNIX_TIMESTAMP('PartitionDate 00:00:00') )
PARTITION DayDate_pnr0 VALUES LESS THAN ( UNIX_TIMESTAMP('PartitionMin') )
);

-- name: create-report-table
CREATE TABLE IF NOT EXISTS `report_capture_all_TableDate` (
CREATE TABLE IF NOT EXISTS `report_capture_all_DayDate` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`micro_ts` bigint(18) NOT NULL DEFAULT '0',
Expand All @@ -41,11 +41,11 @@ CREATE TABLE IF NOT EXISTS `report_capture_all_TableDate` (
KEY `correlationid` (`correlation_id`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
PARTITION BY RANGE ( UNIX_TIMESTAMP(`date`) ) (
PARTITION pPartitionName_pnr0 VALUES LESS THAN ( UNIX_TIMESTAMP('PartitionDate 00:00:00') )
PARTITION DayDate_pnr0 VALUES LESS THAN ( UNIX_TIMESTAMP('PartitionMin') )
);

-- name: create-rtcp-table
CREATE TABLE IF NOT EXISTS `rtcp_capture_all_TableDate` (
CREATE TABLE IF NOT EXISTS `rtcp_capture_all_DayDate` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`micro_ts` bigint(18) NOT NULL DEFAULT '0',
Expand All @@ -64,11 +64,11 @@ CREATE TABLE IF NOT EXISTS `rtcp_capture_all_TableDate` (
KEY `correlationid` (`correlation_id`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
PARTITION BY RANGE ( UNIX_TIMESTAMP(`date`) ) (
PARTITION pPartitionName_pnr0 VALUES LESS THAN ( UNIX_TIMESTAMP('PartitionDate 00:00:00') )
PARTITION DayDate_pnr0 VALUES LESS THAN ( UNIX_TIMESTAMP('PartitionMin') )
);

-- name: create-call-table
CREATE TABLE IF NOT EXISTS `sip_capture_call_TableDate` (
CREATE TABLE IF NOT EXISTS `sip_capture_call_DayDate` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`micro_ts` bigint(18) NOT NULL DEFAULT '0',
Expand Down Expand Up @@ -129,11 +129,11 @@ CREATE TABLE IF NOT EXISTS `sip_capture_call_TableDate` (
KEY `destination_ip` (`destination_ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
PARTITION BY RANGE ( UNIX_TIMESTAMP(`date`) ) (
PARTITION pPartitionName_pnr0 VALUES LESS THAN ( UNIX_TIMESTAMP('PartitionDate 00:00:00') )
PARTITION DayDate_pnr0 VALUES LESS THAN ( UNIX_TIMESTAMP('PartitionMin') )
);

-- name: create-registration-table
CREATE TABLE IF NOT EXISTS `sip_capture_registration_TableDate` (
CREATE TABLE IF NOT EXISTS `sip_capture_registration_DayDate` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`micro_ts` bigint(18) NOT NULL DEFAULT '0',
Expand Down Expand Up @@ -194,5 +194,70 @@ CREATE TABLE IF NOT EXISTS `sip_capture_registration_TableDate` (
KEY `destination_ip` (`destination_ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
PARTITION BY RANGE ( UNIX_TIMESTAMP(`date`) ) (
PARTITION pPartitionName_pnr0 VALUES LESS THAN ( UNIX_TIMESTAMP('PartitionDate 00:00:00') )
PARTITION DayDate_pnr0 VALUES LESS THAN ( UNIX_TIMESTAMP('PartitionMin') )
);

-- name: create-rest-table
CREATE TABLE IF NOT EXISTS `sip_capture_rest_DayDate` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`micro_ts` bigint(18) NOT NULL DEFAULT '0',
`method` varchar(50) NOT NULL DEFAULT '',
`reply_reason` varchar(100) NOT NULL DEFAULT '',
`ruri` varchar(200) NOT NULL DEFAULT '',
`ruri_user` varchar(100) NOT NULL DEFAULT '',
`ruri_domain` varchar(150) NOT NULL DEFAULT '',
`from_user` varchar(100) NOT NULL DEFAULT '',
`from_domain` varchar(150) NOT NULL DEFAULT '',
`from_tag` varchar(64) NOT NULL DEFAULT '',
`to_user` varchar(100) NOT NULL DEFAULT '',
`to_domain` varchar(150) NOT NULL DEFAULT '',
`to_tag` varchar(64) NOT NULL DEFAULT '',
`pid_user` varchar(100) NOT NULL DEFAULT '',
`contact_user` varchar(120) NOT NULL DEFAULT '',
`auth_user` varchar(120) NOT NULL DEFAULT '',
`callid` varchar(120) NOT NULL DEFAULT '',
`callid_aleg` varchar(120) NOT NULL DEFAULT '',
`via_1` varchar(256) NOT NULL DEFAULT '',
`via_1_branch` varchar(80) NOT NULL DEFAULT '',
`cseq` varchar(25) NOT NULL DEFAULT '',
`diversion` varchar(256) NOT NULL DEFAULT '',
`reason` varchar(200) NOT NULL DEFAULT '',
`content_type` varchar(256) NOT NULL DEFAULT '',
`auth` varchar(256) NOT NULL DEFAULT '',
`user_agent` varchar(256) NOT NULL DEFAULT '',
`source_ip` varchar(60) NOT NULL DEFAULT '',
`source_port` int(10) NOT NULL DEFAULT 0,
`destination_ip` varchar(60) NOT NULL DEFAULT '',
`destination_port` int(10) NOT NULL DEFAULT 0,
`contact_ip` varchar(60) NOT NULL DEFAULT '',
`contact_port` int(10) NOT NULL DEFAULT 0,
`originator_ip` varchar(60) NOT NULL DEFAULT '',
`originator_port` int(10) NOT NULL DEFAULT 0,
`expires` int(5) NOT NULL DEFAULT '-1',
`correlation_id` varchar(256) NOT NULL DEFAULT '',
`custom_field1` varchar(120) NOT NULL DEFAULT '',
`custom_field2` varchar(120) NOT NULL DEFAULT '',
`custom_field3` varchar(120) NOT NULL DEFAULT '',
`proto` int(5) NOT NULL DEFAULT 0,
`family` int(1) DEFAULT NULL,
`rtp_stat` varchar(256) NOT NULL DEFAULT '',
`type` int(2) NOT NULL DEFAULT 0,
`node` varchar(125) NOT NULL DEFAULT '',
`msg` varchar(3000) NOT NULL DEFAULT '',
PRIMARY KEY (`id`,`date`),
KEY `ruri_user` (`ruri_user`),
KEY `from_user` (`from_user`),
KEY `to_user` (`to_user`),
KEY `pid_user` (`pid_user`),
KEY `auth_user` (`auth_user`),
KEY `callid_aleg` (`callid_aleg`),
KEY `date` (`date`),
KEY `callid` (`callid`),
KEY `method` (`method`),
KEY `source_ip` (`source_ip`),
KEY `destination_ip` (`destination_ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
PARTITION BY RANGE ( UNIX_TIMESTAMP(`date`) ) (
PARTITION DayDate_pnr0 VALUES LESS THAN ( UNIX_TIMESTAMP('PartitionMin') )
);
2 changes: 1 addition & 1 deletion database/files/homer5/pgsql/droplog.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
-- name: drop-partition-logs_capture
DROP TABLE logs_capture_PartitionName_pnr0000;
DROP TABLE logs_capture_DayDate_pnr0000;
4 changes: 2 additions & 2 deletions database/files/homer5/pgsql/dropqos.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- name: drop-partition-report_capture
DROP TABLE report_capture_PartitionName_pnr0000;
DROP TABLE report_capture_DayDate_pnr0000;

-- name: drop-partition-rtcp_capture
DROP TABLE rtcp_capture_PartitionName_pnr0000;
DROP TABLE rtcp_capture_DayDate_pnr0000;
7 changes: 5 additions & 2 deletions database/files/homer5/pgsql/dropsip.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
-- name: drop-partition-sip_capture_call
DROP TABLE sip_capture_call_PartitionName_pnr0000;
DROP TABLE sip_capture_call_DayDate_pnr0000;

-- name: drop-partition-sip_capture_registration
DROP TABLE sip_capture_registration_PartitionName_pnr0000;
DROP TABLE sip_capture_registration_DayDate_pnr0000;

-- name: drop-partition-sip_capture_rest
DROP TABLE sip_capture_rest_DayDate_pnr0000;
4 changes: 2 additions & 2 deletions database/files/homer5/pgsql/idxlog.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- name: index-logs-date
CREATE INDEX IF NOT EXISTS logs_capture_PartitionName_pnr0000_date ON logs_capture_PartitionName_pnr0000 (date);
CREATE INDEX IF NOT EXISTS logs_capture_DayDate_pnr0000_date ON logs_capture_DayDate_pnr0000 (date);
-- name: index-logs-correlation
CREATE INDEX IF NOT EXISTS logs_capture_PartitionName_pnr0000_correlation_id ON logs_capture_PartitionName_pnr0000 (correlation_id);
CREATE INDEX IF NOT EXISTS logs_capture_DayDate_pnr0000_correlation_id ON logs_capture_DayDate_pnr0000 (correlation_id);
8 changes: 4 additions & 4 deletions database/files/homer5/pgsql/idxqos.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-- name: index-report-date
CREATE INDEX IF NOT EXISTS report_capture_PartitionName_pnr0000_date ON report_capture_PartitionName_pnr0000 (date);
CREATE INDEX IF NOT EXISTS report_capture_DayDate_pnr0000_date ON report_capture_DayDate_pnr0000 (date);
-- name: index-report-correlation
CREATE INDEX IF NOT EXISTS report_capture_PartitionName_pnr0000_correlation_id ON report_capture_PartitionName_pnr0000 (correlation_id);
CREATE INDEX IF NOT EXISTS report_capture_DayDate_pnr0000_correlation_id ON report_capture_DayDate_pnr0000 (correlation_id);

-- name: index-rtcp-date
CREATE INDEX IF NOT EXISTS rtcp_capture_PartitionName_pnr0000_date ON rtcp_capture_PartitionName_pnr0000 (date);
CREATE INDEX IF NOT EXISTS rtcp_capture_DayDate_pnr0000_date ON rtcp_capture_DayDate_pnr0000 (date);
-- name: index-rtcp-correlation
CREATE INDEX IF NOT EXISTS rtcp_capture_PartitionName_pnr0000_correlation_id ON rtcp_capture_PartitionName_pnr0000 (correlation_id);
CREATE INDEX IF NOT EXISTS rtcp_capture_DayDate_pnr0000_correlation_id ON rtcp_capture_DayDate_pnr0000 (correlation_id);
Loading

0 comments on commit 27d59b1

Please sign in to comment.