Documentation ¶
Index ¶
- Constants
- func AddAlertID(ctx *Context, dev config.AlertIDCfg)
- func AddDeviceStat(ctx *Context, dev config.DeviceStatCfg)
- func AddEndpoint(ctx *Context, dev config.EndpointCfg)
- func AddIfxDB(ctx *Context, dev config.IfxDBCfg)
- func AddIfxMeasurement(ctx *Context, dev config.IfxMeasurementCfg)
- func AddIfxServer(ctx *Context, dev config.IfxServerCfg)
- func AddKapacitor(ctx *Context, dev config.KapacitorCfg)
- func AddOperation(ctx *Context, dev config.OperationCfg)
- func AddProduct(ctx *Context, dev config.ProductCfg)
- func AddProductGroup(ctx *Context, dev config.ProductGroupCfg)
- func AddRangeTime(ctx *Context, dev config.RangeTimeCfg)
- func AddTemplate(ctx *Context, dev config.TemplateCfg)
- func BulkExportObjectToFile(ctx *Context, data impexp.ExportData)
- func Create(SSLCA, SSLCert, SSLKey string, InsecureSkipVerify bool) (*tls.Config, error)
- func DeleteAlertEvent(ctx *Context)
- func DeleteAlertEventHist(ctx *Context)
- func DeleteAlertID(ctx *Context)
- func DeleteDeviceStat(ctx *Context)
- func DeleteEndpoint(ctx *Context)
- func DeleteIfxDB(ctx *Context)
- func DeleteIfxMeasurement(ctx *Context)
- func DeleteIfxServer(ctx *Context)
- func DeleteKapaTask(id string) (int, int, []string)
- func DeleteKapacitor(ctx *Context)
- func DeleteOperation(ctx *Context)
- func DeleteProduct(ctx *Context)
- func DeleteProductGroup(ctx *Context)
- func DeleteRangeTime(ctx *Context)
- func DeleteTemplate(ctx *Context)
- func DeployAlertID(ctx *Context, dev config.AlertIDCfg)
- func DeployTemplate(ctx *Context, dev config.TemplateCfg)
- func ExportObject(ctx *Context)
- func ExportObjectToFile(ctx *Context, info impexp.ExportInfo)
- func GetAlertEvent(ctx *Context)
- func GetAlertEventAffectOnDel(ctx *Context)
- func GetAlertEventByID(ctx *Context)
- func GetAlertEventHist(ctx *Context)
- func GetAlertEventHistAffectOnDel(ctx *Context)
- func GetAlertEventHistByID(ctx *Context)
- func GetAlertEventHistWithParams(ctx *Context)
- func GetAlertEventWithParams(ctx *Context)
- func GetAlertEventsByLevel(ctx *Context)
- func GetAlertEventsHistByLevel(ctx *Context)
- func GetAlertID(ctx *Context)
- func GetAlertIDAffectOnDel(ctx *Context)
- func GetAlertIDCfgArrayByProductID(ctx *Context)
- func GetAlertIDCfgByID(ctx *Context)
- func GetAlertIDCfgByTemplate(sTriggerType string, sCritDirection string, sTrendType string, ...) ([]string, error)
- func GetContextHandler() macaron.Handler
- func GetDeviceStat(ctx *Context)
- func GetDeviceStatAffectOnDel(ctx *Context)
- func GetDeviceStatCfgByID(ctx *Context)
- func GetDevicesByAlertID(ctx *Context)
- func GetDevicesByProductID(ctx *Context)
- func GetEndpoint(ctx *Context)
- func GetEndpointAffectOnDel(ctx *Context)
- func GetEndpointCfgByID(ctx *Context)
- func GetIfxDB(ctx *Context)
- func GetIfxDBAffectOnDel(ctx *Context)
- func GetIfxDBCfgArrayByMeasName(ctx *Context)
- func GetIfxDBCfgByID(ctx *Context)
- func GetIfxMeasurement(ctx *Context)
- func GetIfxMeasurementAffectOnDel(ctx *Context)
- func GetIfxMeasurementCfgByDbIDMeasName(ctx *Context)
- func GetIfxMeasurementCfgByID(ctx *Context)
- func GetIfxMeasurementCfgDistinctNamesArray(ctx *Context)
- func GetIfxMeasurementTagsArray(ctx *Context)
- func GetIfxServer(ctx *Context)
- func GetIfxServerAffectOnDel(ctx *Context)
- func GetIfxServerCfgByID(ctx *Context)
- func GetKapacitor(ctx *Context)
- func GetKapacitorAffectOnDel(ctx *Context)
- func GetKapacitorCfgByID(ctx *Context)
- func GetKapacitorRtTasks(ctx *Context)
- func GetOperation(ctx *Context)
- func GetOperationAffectOnDel(ctx *Context)
- func GetOperationCfgByID(ctx *Context)
- func GetProduct(ctx *Context)
- func GetProductAffectOnDel(ctx *Context)
- func GetProductCfgByID(ctx *Context)
- func GetProductGroup(ctx *Context)
- func GetProductGroupAffectOnDel(ctx *Context)
- func GetProductGroupCfgByID(ctx *Context)
- func GetRangeTime(ctx *Context)
- func GetRangeTimeAffectOnDel(ctx *Context)
- func GetRangeTimeCfgByID(ctx *Context)
- func GetTemplate(ctx *Context)
- func GetTemplateAffectOnDel(ctx *Context)
- func GetTemplateCfgByID(ctx *Context)
- func GetTemplates(templateid string) ([]*config.TemplateCfg, error)
- func ImportDataFile(ctx *Context, uf UploadForm)
- func ImportIfxCatalog(ctx *Context, dev config.IfxServerCfg)
- func InfluxQuery(cli client.Client, query string, db string, colidx int) ([]string, error)
- func MoveAlertEvents(filter string) []*config.AlertEvent
- func NewAPICfgAlertID(m *macaron.Macaron) error
- func NewAPICfgDeviceStat(m *macaron.Macaron) error
- func NewAPICfgEndpoint(m *macaron.Macaron) error
- func NewAPICfgIfxDB(m *macaron.Macaron) error
- func NewAPICfgIfxMeasurement(m *macaron.Macaron) error
- func NewAPICfgIfxServer(m *macaron.Macaron) error
- func NewAPICfgImportExport(m *macaron.Macaron) error
- func NewAPICfgKapacitor(m *macaron.Macaron) error
- func NewAPICfgOperation(m *macaron.Macaron) error
- func NewAPICfgProduct(m *macaron.Macaron) error
- func NewAPICfgProductGroup(m *macaron.Macaron) error
- func NewAPICfgRangeTime(m *macaron.Macaron) error
- func NewAPICfgTemplate(m *macaron.Macaron) error
- func NewAPIRtAgent(m *macaron.Macaron) error
- func NewAPIRtAlertEvent(m *macaron.Macaron) error
- func NewAPIRtAlertEventHist(m *macaron.Macaron) error
- func NewAPIRtKapFilter(m *macaron.Macaron) error
- func NewAPIRtKapProxy(m *macaron.Macaron) error
- func NewAPIRtKapacitor(m *macaron.Macaron) error
- func PingIfxServer(ctx *Context, dev config.IfxServerCfg)
- func PingKapacitor(ctx *Context, dev config.KapacitorCfg)
- func RTAlertHandler(ctx *Context, al alert.Data)
- func RTGetVersion(ctx *Context)
- func RTKapProxyGETHandler(ctx *Context)
- func RTKapProxyOTHERHandler(ctx *Context)
- func RTKapProxyPOSTHandler(ctx *Context)
- func RTKapProxyTest(ctx *Context)
- func Sessioner(options session.Options) macaron.Handler
- func SetConfDir(dir string)
- func SetLogDir(dir string)
- func SetLogger(l *logrus.Logger)
- func UpdateAlertID(ctx *Context, dev config.AlertIDCfg)
- func UpdateDeviceStat(ctx *Context, dev config.DeviceStatCfg)
- func UpdateEndpoint(ctx *Context, dev config.EndpointCfg)
- func UpdateIfxDB(ctx *Context, dev config.IfxDBCfg)
- func UpdateIfxMeasurement(ctx *Context, dev config.IfxMeasurementCfg)
- func UpdateIfxServer(ctx *Context, dev config.IfxServerCfg)
- func UpdateKapacitor(ctx *Context, dev config.KapacitorCfg)
- func UpdateOperation(ctx *Context, dev config.OperationCfg)
- func UpdateProduct(ctx *Context, dev config.ProductCfg)
- func UpdateProductGroup(ctx *Context, dev config.ProductGroupCfg)
- func UpdateRangeTime(ctx *Context, dev config.RangeTimeCfg)
- func UpdateTemplate(ctx *Context, dev config.TemplateCfg)
- func WebServer(publicPath string, httpPort int, cfg *config.HTTPConfig, id string)
- type Context
- type Diagnostic
- type ImportCheck
- type KapaTaskRt
- type Service
- type SessionStore
- type SessionWrapper
- type SlackConfig
- type TaskAlertInfo
- type UploadForm
- type UserLogin
Constants ¶
const (
// SessKeyUserID UserID auth type
SessKeyUserID = "uid"
)
Variables ¶
This section is empty.
Functions ¶
func AddAlertID ¶
func AddAlertID(ctx *Context, dev config.AlertIDCfg)
AddAlertID Inserts new alert into the internal DB and into the kapacitor servers
func AddDeviceStat ¶
func AddDeviceStat(ctx *Context, dev config.DeviceStatCfg)
AddDeviceStat Insert new devicestat to the internal BBDD --pending--
func AddEndpoint ¶
func AddEndpoint(ctx *Context, dev config.EndpointCfg)
AddEndpoint Insert new endpoint to the internal BBDD --pending--
func AddIfxMeasurement ¶
func AddIfxMeasurement(ctx *Context, dev config.IfxMeasurementCfg)
AddIfxMeasurement Insert new IfxMeasurement to the internal BBDD --pending--
func AddIfxServer ¶
func AddIfxServer(ctx *Context, dev config.IfxServerCfg)
AddIfxServer Inserts Influx Server to the internal database and returns the result on context
func AddKapacitor ¶
func AddKapacitor(ctx *Context, dev config.KapacitorCfg)
AddKapacitor Insert new Kapacitor to the internal BBDD --pending--
func AddOperation ¶
func AddOperation(ctx *Context, dev config.OperationCfg)
AddOperation Insert new Operation to the internal BBDD
func AddProduct ¶
func AddProduct(ctx *Context, dev config.ProductCfg)
AddProduct Insert new Product to the internal BBDD --pending--
func AddProductGroup ¶
func AddProductGroup(ctx *Context, dev config.ProductGroupCfg)
AddProductGroup Insert new productgroup to the internal BBDD --pending--
func AddRangeTime ¶
func AddRangeTime(ctx *Context, dev config.RangeTimeCfg)
AddRangeTime Insert new rangetime to the internal BBDD
func AddTemplate ¶
func AddTemplate(ctx *Context, dev config.TemplateCfg)
AddTemplate Inserts new template into the internal DB and into the kapacitor servers
func BulkExportObjectToFile ¶
func BulkExportObjectToFile(ctx *Context, data impexp.ExportData)
BulkExportObjectToFile bulk export to file
func DeleteAlertEvent ¶
func DeleteAlertEvent(ctx *Context)
DeleteAlertEvent removes alert event from resistor database
func DeleteAlertEventHist ¶
func DeleteAlertEventHist(ctx *Context)
DeleteAlertEventHist removes alert event from resistor database
func DeleteAlertID ¶
func DeleteAlertID(ctx *Context)
DeleteAlertID removes alert from resistor database
func DeleteIfxMeasurement ¶
func DeleteIfxMeasurement(ctx *Context)
DeleteIfxMeasurement delete from the catalog database
func DeleteIfxServer ¶
func DeleteIfxServer(ctx *Context)
DeleteIfxServer Deletes Influx Server from the internal database and returns the result on context
func DeleteKapaTask ¶
DeleteKapaTask Deletes task from kapacitor servers
func DeleteProduct ¶
func DeleteProduct(ctx *Context)
DeleteProduct delete from the catalog database
func DeleteProductGroup ¶
func DeleteProductGroup(ctx *Context)
DeleteProductGroup delete from the catalog database
func DeleteTemplate ¶
func DeleteTemplate(ctx *Context)
DeleteTemplate Deletes template from resistor database and from kapacitor servers. First of all, a checking is done to ensure this template is not used by any resistor alert
func DeployAlertID ¶
func DeployAlertID(ctx *Context, dev config.AlertIDCfg)
DeployAlertID Deploys the task related to this alert into the kapacitor server and returns the result in context
func DeployTemplate ¶
func DeployTemplate(ctx *Context, dev config.TemplateCfg)
DeployTemplate Deploys template into the kapacitor servers and returns the result in context
func ExportObjectToFile ¶
func ExportObjectToFile(ctx *Context, info impexp.ExportInfo)
ExportObjectToFile export to file
func GetAlertEvent ¶
func GetAlertEvent(ctx *Context)
GetAlertEvent Returns Alert Events list to frontend
func GetAlertEventAffectOnDel ¶
func GetAlertEventAffectOnDel(ctx *Context)
GetAlertEventAffectOnDel Returns array of objects affected when deleting an alert event (empty array in this case)
func GetAlertEventByID ¶
func GetAlertEventByID(ctx *Context)
GetAlertEventByID Returns Alert Event to frontend
func GetAlertEventHist ¶
func GetAlertEventHist(ctx *Context)
GetAlertEventHist Returns Alert Events list to frontend
func GetAlertEventHistAffectOnDel ¶
func GetAlertEventHistAffectOnDel(ctx *Context)
GetAlertEventHistAffectOnDel Returns array of objects affected when deleting an alert event (empty array in this case)
func GetAlertEventHistByID ¶
func GetAlertEventHistByID(ctx *Context)
GetAlertEventHistByID Returns Alert Event to frontend
func GetAlertEventHistWithParams ¶
func GetAlertEventHistWithParams(ctx *Context)
GetAlertEventHistWithParams Returns Alert Events list to frontend
func GetAlertEventWithParams ¶
func GetAlertEventWithParams(ctx *Context)
GetAlertEventWithParams Returns Alert Events list to frontend
func GetAlertEventsByLevel ¶
func GetAlertEventsByLevel(ctx *Context)
GetAlertEventsByLevel Returns Alert Events grouped by level to frontend
func GetAlertEventsHistByLevel ¶
func GetAlertEventsHistByLevel(ctx *Context)
GetAlertEventsHistByLevel Returns Alert Events History grouped by level to frontend
func GetAlertIDAffectOnDel ¶
func GetAlertIDAffectOnDel(ctx *Context)
GetAlertIDAffectOnDel --pending--
func GetAlertIDCfgArrayByProductID ¶
func GetAlertIDCfgArrayByProductID(ctx *Context)
GetAlertIDCfgArrayByProductID Gets AlertIDCfgArray By ProductID from resistor database Returns the information of the process with a JSON in context
func GetAlertIDCfgByID ¶
func GetAlertIDCfgByID(ctx *Context)
GetAlertIDCfgByID Gets AlertIDCfg By ID from resistor database and checks if the corresponding kapacitor task is deployed on all kapacitor servers. Returns the information of the process with a JSON in context
func GetAlertIDCfgByTemplate ¶
func GetAlertIDCfgByTemplate(sTriggerType string, sCritDirection string, sTrendType string, sTrendSign string, sFieldType string, sStatFunc string) ([]string, error)
GetAlertIDCfgByTemplate Gets an array of strings with the IDs of the Alerts where this template is used. The input parameters are the 6 fields needed to define a template.
func GetDeviceStat ¶
func GetDeviceStat(ctx *Context)
GetDeviceStat Return devicestats list to frontend
func GetDeviceStatAffectOnDel ¶
func GetDeviceStatAffectOnDel(ctx *Context)
GetDeviceStatAffectOnDel --pending--
func GetDeviceStatCfgByID ¶
func GetDeviceStatCfgByID(ctx *Context)
GetDeviceStatCfgByID --pending--
func GetDevicesByAlertID ¶
func GetDevicesByAlertID(ctx *Context)
GetDevicesByAlertID Gets the list of devices related to the alertid parameter and returns the result on context
func GetDevicesByProductID ¶
func GetDevicesByProductID(ctx *Context)
GetDevicesByProductID Gets the list of devices related to the productid parameter and returns the result on context
func GetEndpointAffectOnDel ¶
func GetEndpointAffectOnDel(ctx *Context)
GetEndpointAffectOnDel --pending--
func GetIfxDBCfgArrayByMeasName ¶
func GetIfxDBCfgArrayByMeasName(ctx *Context)
GetIfxDBCfgArrayByMeasName Gets an array of Influx databases with their measurements
func GetIfxMeasurement ¶
func GetIfxMeasurement(ctx *Context)
GetIfxMeasurement Return IfxMeasurement list to frontend
func GetIfxMeasurementAffectOnDel ¶
func GetIfxMeasurementAffectOnDel(ctx *Context)
GetIfxMeasurementAffectOnDel --pending--
func GetIfxMeasurementCfgByDbIDMeasName ¶
func GetIfxMeasurementCfgByDbIDMeasName(ctx *Context)
GetIfxMeasurementCfgByDbIDMeasName Gets an Influx Measurement with all its information from DbID and Measurement Name
func GetIfxMeasurementCfgByID ¶
func GetIfxMeasurementCfgByID(ctx *Context)
GetIfxMeasurementCfgByID --pending--
func GetIfxMeasurementCfgDistinctNamesArray ¶
func GetIfxMeasurementCfgDistinctNamesArray(ctx *Context)
GetIfxMeasurementCfgDistinctNamesArray Return IfxMeasurement list with different names to frontend
func GetIfxMeasurementTagsArray ¶
func GetIfxMeasurementTagsArray(ctx *Context)
GetIfxMeasurementTagsArray Gets the array of tags for the measurements passed in filter The filter contains a list of measurement names then with these measurement names a list of tags is obtained
func GetIfxServer ¶
func GetIfxServer(ctx *Context)
GetIfxServer Returns Influx Server list to frontend
func GetIfxServerAffectOnDel ¶
func GetIfxServerAffectOnDel(ctx *Context)
GetIfxServerAffectOnDel Checks if Deletion of Influx Server affects on some other items of the internal database and returns the result on context
func GetIfxServerCfgByID ¶
func GetIfxServerCfgByID(ctx *Context)
GetIfxServerCfgByID Returns Influx Server to frontend
func GetKapacitor ¶
func GetKapacitor(ctx *Context)
GetKapacitor Return kapacitor servers list to frontend
func GetKapacitorAffectOnDel ¶
func GetKapacitorAffectOnDel(ctx *Context)
GetKapacitorAffectOnDel --pending--
func GetKapacitorRtTasks ¶
func GetKapacitorRtTasks(ctx *Context)
GetKapacitorRtTasks Return tasks list from kapacitor servers
func GetOperationAffectOnDel ¶
func GetOperationAffectOnDel(ctx *Context)
GetOperationAffectOnDel Gets array of alerts affected On Deletion
func GetOperationCfgByID ¶
func GetOperationCfgByID(ctx *Context)
GetOperationCfgByID Gets OperationCfg By ID
func GetProductAffectOnDel ¶
func GetProductAffectOnDel(ctx *Context)
GetProductAffectOnDel --pending--
func GetProductGroup ¶
func GetProductGroup(ctx *Context)
GetProductGroup Return productgroup list to frontend
func GetProductGroupAffectOnDel ¶
func GetProductGroupAffectOnDel(ctx *Context)
GetProductGroupAffectOnDel --pending--
func GetProductGroupCfgByID ¶
func GetProductGroupCfgByID(ctx *Context)
GetProductGroupCfgByID --pending--
func GetRangeTimeAffectOnDel ¶
func GetRangeTimeAffectOnDel(ctx *Context)
GetRangeTimeAffectOnDel Check if there are any AlertIDCfg affected when deleting RangeTimeCfg
func GetRangeTimeCfgByID ¶
func GetRangeTimeCfgByID(ctx *Context)
GetRangeTimeCfgByID Gets RangeTimeCfg By ID and returns it on context
func GetTemplateAffectOnDel ¶
func GetTemplateAffectOnDel(ctx *Context)
GetTemplateAffectOnDel --pending--
func GetTemplates ¶
func GetTemplates(templateid string) ([]*config.TemplateCfg, error)
GetTemplates Gets templates array
func ImportDataFile ¶
func ImportDataFile(ctx *Context, uf UploadForm)
ImportDataFile gets data from file upa
func ImportIfxCatalog ¶
func ImportIfxCatalog(ctx *Context, dev config.IfxServerCfg)
ImportIfxCatalog Imports Influx Catalog to the internal database
func InfluxQuery ¶
InfluxQuery does IQL queries
func MoveAlertEvents ¶
func MoveAlertEvents(filter string) []*config.AlertEvent
MoveAlertEvents Moves previous alert events with this filter from alert_event to alert_event_hist
func NewAPICfgAlertID ¶
func NewAPICfgAlertID(m *macaron.Macaron) error
NewAPICfgAlertID config API for alerts
func NewAPICfgDeviceStat ¶
func NewAPICfgDeviceStat(m *macaron.Macaron) error
NewAPICfgDeviceStat get DeviceStat API
func NewAPICfgEndpoint ¶
func NewAPICfgEndpoint(m *macaron.Macaron) error
NewAPICfgEndpoint create new API
func NewAPICfgIfxDB ¶
func NewAPICfgIfxDB(m *macaron.Macaron) error
NewAPICfgIfxDB API for IfxDB Catalog Management
func NewAPICfgIfxMeasurement ¶
func NewAPICfgIfxMeasurement(m *macaron.Macaron) error
NewAPICfgIfxMeasurement API for IfxMeasurement Catalog Management
func NewAPICfgIfxServer ¶
func NewAPICfgIfxServer(m *macaron.Macaron) error
NewAPICfgIfxServer API for IfxServer Catalog Management
func NewAPICfgImportExport ¶
func NewAPICfgImportExport(m *macaron.Macaron) error
NewAPICfgImportExport import export API
func NewAPICfgKapacitor ¶
func NewAPICfgKapacitor(m *macaron.Macaron) error
NewAPICfgKapacitor Kapacitor ouput
func NewAPICfgOperation ¶
func NewAPICfgOperation(m *macaron.Macaron) error
NewAPICfgOperation Operation instructions
func NewAPICfgProduct ¶
func NewAPICfgProduct(m *macaron.Macaron) error
NewAPICfgProduct API for Product Catalog Management
func NewAPICfgProductGroup ¶
func NewAPICfgProductGroup(m *macaron.Macaron) error
NewAPICfgProductGroup API for Product Catalog Management
func NewAPICfgRangeTime ¶
func NewAPICfgRangeTime(m *macaron.Macaron) error
NewAPICfgRangeTime create a Range Time management API
func NewAPICfgTemplate ¶
func NewAPICfgTemplate(m *macaron.Macaron) error
NewAPICfgTemplate set API for the template management
func NewAPIRtAgent ¶
func NewAPIRtAgent(m *macaron.Macaron) error
NewAPIRtAgent set API for the runtime management
func NewAPIRtAlertEvent ¶
func NewAPIRtAlertEvent(m *macaron.Macaron) error
NewAPIRtAlertEvent creates an Alert Event management API
func NewAPIRtAlertEventHist ¶
func NewAPIRtAlertEventHist(m *macaron.Macaron) error
NewAPIRtAlertEventHist creates an Alert Event History management API
func NewAPIRtKapFilter ¶
func NewAPIRtKapFilter(m *macaron.Macaron) error
NewAPIRtKapFilter set the runtime Kapacitor filter API
func NewAPIRtKapProxy ¶
func NewAPIRtKapProxy(m *macaron.Macaron) error
NewAPIRtKapProxy set the runtime Kapacitor Proxy
func NewAPIRtKapacitor ¶
func NewAPIRtKapacitor(m *macaron.Macaron) error
NewAPIRtKapacitor Kapacitor ouput
func PingIfxServer ¶
func PingIfxServer(ctx *Context, dev config.IfxServerCfg)
PingIfxServer Pings Influx Server and returns the result on context
func PingKapacitor ¶
func PingKapacitor(ctx *Context, dev config.KapacitorCfg)
PingKapacitor Pings kapacitor server and returns time elapsed and kapacitor server version
func RTKapProxyGETHandler ¶
func RTKapProxyGETHandler(ctx *Context)
RTKapProxyGETHandler GET handler
func RTKapProxyOTHERHandler ¶
func RTKapProxyOTHERHandler(ctx *Context)
RTKapProxyOTHERHandler for handing other than GET/POST methots ( rigth now DELETE/PATCH)
func RTKapProxyPOSTHandler ¶
func RTKapProxyPOSTHandler(ctx *Context)
RTKapProxyPOSTHandler POST handler
func UpdateAlertID ¶
func UpdateAlertID(ctx *Context, dev config.AlertIDCfg)
UpdateAlertID Updates alert into the internal DB and into the kapacitor servers
func UpdateDeviceStat ¶
func UpdateDeviceStat(ctx *Context, dev config.DeviceStatCfg)
UpdateDeviceStat --pending--
func UpdateEndpoint ¶
func UpdateEndpoint(ctx *Context, dev config.EndpointCfg)
UpdateEndpoint --pending--
func UpdateIfxMeasurement ¶
func UpdateIfxMeasurement(ctx *Context, dev config.IfxMeasurementCfg)
UpdateIfxMeasurement --pending--
func UpdateIfxServer ¶
func UpdateIfxServer(ctx *Context, dev config.IfxServerCfg)
UpdateIfxServer Updates Influx Server into the internal database and returns the result on context
func UpdateKapacitor ¶
func UpdateKapacitor(ctx *Context, dev config.KapacitorCfg)
UpdateKapacitor --pending--
func UpdateOperation ¶
func UpdateOperation(ctx *Context, dev config.OperationCfg)
UpdateOperation Updates Operation
func UpdateProduct ¶
func UpdateProduct(ctx *Context, dev config.ProductCfg)
UpdateProduct --pending--
func UpdateProductGroup ¶
func UpdateProductGroup(ctx *Context, dev config.ProductGroupCfg)
UpdateProductGroup --pending--
func UpdateRangeTime ¶
func UpdateRangeTime(ctx *Context, dev config.RangeTimeCfg)
UpdateRangeTime Updates rangetime into the internal BBDD
func UpdateTemplate ¶
func UpdateTemplate(ctx *Context, dev config.TemplateCfg)
UpdateTemplate Updates template into the internal DB and into the kapacitor servers
Types ¶
type Context ¶
type Context struct { *macaron.Context SignedInUser string Session SessionStore IsSignedIn bool }
Context for macaron sessions on resistor
type Diagnostic ¶
type Diagnostic interface { WithContext(ctx ...keyvalue.T) Diagnostic InsecureSkipVerify() Error(msg string, err error) }
Diagnostic data for Slack
type ImportCheck ¶
type ImportCheck struct { IsOk bool Message string Data *impexp.ExportData }
ImportCheck type
type KapaTaskRt ¶
type KapaTaskRt struct { ID string `json:"ID"` ServerID string `json:"ServerID"` URL string `json:"URL,omitempty"` Type kapacitorClient.TaskType `json:"Type,omitempty"` DBRPs string `json:"DBRPs,omitempty"` TICKscript string `json:"script,omitempty"` Vars string `json:"vars,omitempty"` Dot string `json:"Dot,omitempty"` Status kapacitorClient.TaskStatus `json:"Status,omitempty"` Executing bool `json:"Executing,omitempty"` Error string `json:"Error,omitempty"` NumErrors int64 `json:"NumErrors,omitempty"` ExecutionStats string `json:"stats,omitempty"` Created time.Time `json:"Created,omitempty"` Modified time.Time `json:"Modified,omitempty"` LastEnabled time.Time `json:"LastEnabled,omitempty"` AlertModified time.Time `json:"AlertModified,omitempty"` }
KapaTaskRt Structure with Kapacitor server info and Task info
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service data for Slack
func NewService ¶
func NewService(c SlackConfig, d Diagnostic) (*Service, error)
NewService function for Slack
type SessionStore ¶
type SessionStore interface { // Set sets value to given key in session. Set(interface{}, interface{}) error // Get gets value by given key in session. Get(interface{}) interface{} // ID returns current session ID. ID() string // Release releases session resource and save data to provider. Release() error // Destory deletes a session. Destory(*Context) error // init Start(*Context) error }
SessionStore where to store sessions
type SessionWrapper ¶
type SessionWrapper struct {
// contains filtered or unexported fields
}
SessionWrapper wrapper for session handlers
func (*SessionWrapper) Get ¶
func (s *SessionWrapper) Get(k interface{}) interface{}
Get Session getter
func (*SessionWrapper) Set ¶
func (s *SessionWrapper) Set(k interface{}, v interface{}) error
Set session setter
type SlackConfig ¶
type SlackConfig struct { // Whether Slack integration is enabled. Enabled bool `json:"enabled" override:"enabled"` // The Slack webhook URL, can be obtained by adding Incoming Webhook integration. URL string `json:"url" override:"url,redact"` // The default channel, can be overridden per alert. Channel string `json:"channel" override:"channel"` // The username of the Slack bot. // Default: kapacitor Username string `json:"username" override:"username"` // IconEmoji uses an emoji instead of the normal icon for the message. // The contents should be the name of an emoji surrounded with ':', i.e. ':chart_with_upwards_trend:' IconEmoji string `json:"icon-emoji" override:"icon-emoji"` // Whether all alerts should automatically post to slack Global bool `json:"global" override:"global"` // Whether all alerts should automatically use stateChangesOnly mode. // Only applies if global is also set. StateChangesOnly bool `json:"state-changes-only" override:"state-changes-only"` // Path to CA file SSLCA string `json:"ssl-ca" override:"ssl-ca"` // Path to host cert file SSLCert string `json:"ssl-cert" override:"ssl-cert"` // Path to cert key file SSLKey string `json:"ssl-key" override:"ssl-key"` // Use SSL but skip chain & host verification InsecureSkipVerify bool `json:"insecure-skip-verify" override:"insecure-skip-verify"` }
SlackConfig data for Slack
type TaskAlertInfo ¶
type TaskAlertInfo struct { ID string `json:"id"` Message string `json:"message"` Details string `json:"details"` Time time.Time `json:"time"` Level alert.Level `json:"level"` CorrelationID string `json:"correlationid"` Origin string `json:"origin"` ResistorOperationID string `json:"resistor-operationid"` ResistorOperationURL string `json:"resistor-operationurl"` ResistorDashboardURL string `json:"resistor-dashboardurl"` ResistorIDTagName string `json:"resistor-id-tag-name"` ResistorIDTagValue string `json:"resistor-id-tag-value"` ResistorProductTagName string `json:"resistor-product-tag-name"` ResistorProductTagValue string `json:"resistor-product-tag-value"` ResistorAlertTriggered string `json:"resistor-alert-triggered"` ResistorAlertTags map[string]string `json:"resistor-alert-tags,omitempty"` ResistorAlertFields map[string]interface{} `json:"resistor-alert-fields,omitempty"` ResistorAlertInfo config.AlertIDCfgJSON `json:"resistor-alert-info,omitempty"` }
TaskAlertInfo represents the info of a kapacitor alert event completed with the info of the related resistor alert
type UploadForm ¶
type UploadForm struct { AutoRename bool OverWrite bool ExportFile *multipart.FileHeader }
UploadForm struct to upload files
Source Files ¶
- apicfg-alertid.go
- apicfg-devicestat.go
- apicfg-endpoint.go
- apicfg-ifxdb.go
- apicfg-ifxmeasurement.go
- apicfg-ifxserver.go
- apicfg-impexp.go
- apicfg-kapacitor.go
- apicfg-operation.go
- apicfg-product.go
- apicfg-productgroup.go
- apicfg-rangetimes.go
- apicfg-template.go
- apirt-agent.go
- apirt-alertevent.go
- apirt-alerteventhist.go
- apirt-kapacitor.go
- apirt-kapfilter.go
- apirt-kapproxy.go
- extravalidations.go
- webcontext.go
- webserver.go
- websession.go