Documentation ¶
Index ¶
- func ImportDashboards(beatName, beatVersion string, esClient DashboardLoader, cfg *common.Config) error
- type DashboardLoader
- type DashboardsConfig
- type Importer
- func (imp Importer) CreateKibanaIndex() error
- func (imp Importer) Import() error
- func (imp Importer) ImportArchive() error
- func (imp Importer) ImportDashboard(file string) error
- func (imp Importer) ImportDir(dirType string, dir string) error
- func (imp Importer) ImportFile(fileType string, file string) error
- func (imp Importer) ImportIndex(file string) error
- func (imp Importer) ImportJSONFile(fileType string, file string) error
- func (imp Importer) ImportKibana(dir string) error
- func (imp Importer) ImportSearch(file string) error
- func (imp Importer) ImportVisualization(file string) error
- type MessageOutputter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImportDashboards ¶
func ImportDashboards(beatName, beatVersion string, esClient DashboardLoader, cfg *common.Config) error
Types ¶
type DashboardLoader ¶
type DashboardLoader interface { LoadJSON(path string, json map[string]interface{}) ([]byte, error) CreateIndex(index string, body interface{}) (int, *elasticsearch.QueryResult, error) }
DashboardLoader is a subset of the Elasticsearch client API capable of loading the dashboards.
type DashboardsConfig ¶
type DashboardsConfig struct { Enabled bool `config:"enabled"` KibanaIndex string `config:"kibana_index"` Index string `config:"index"` Dir string `config:"directory"` File string `config:"file"` Beat string `config:"beat"` URL string `config:"url"` OnlyDashboards bool `config:"only_dashboards"` OnlyIndex bool `config:"only_index"` Snapshot bool `config:"snapshot"` SnapshotURL string `config:"snapshot_url"` }
type Importer ¶
type Importer struct {
// contains filtered or unexported fields
}
func NewImporter ¶
func NewImporter(cfg *DashboardsConfig, client DashboardLoader, msgOutputter *MessageOutputter) (*Importer, error)
func (Importer) CreateKibanaIndex ¶
CreateKibanaIndex creates the kibana index if it doesn't exists and sets some index properties which are needed as a workaround for: https://github.com/elastic/beats-dashboards/issues/94
func (Importer) Import ¶
Import imports the Kibana dashboards according to the configuration options.
func (Importer) ImportArchive ¶
func (Importer) ImportDashboard ¶
func (Importer) ImportIndex ¶
func (Importer) ImportJSONFile ¶
func (Importer) ImportKibana ¶
import Kibana dashboards and index-pattern or only one of these
func (Importer) ImportSearch ¶
func (Importer) ImportVisualization ¶
type MessageOutputter ¶
type MessageOutputter func(msg string, a ...interface{})
MessageOutputter is a function type for injecting status logging into this module.
Click to show internal directories.
Click to hide internal directories.