Documentation ¶
Overview ¶
*
- Copyright 2017 ~ 2025 the original author or authors. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
*
- Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com]. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
*
- Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com]. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
*
- Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com]. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
*
- Copyright 2017 ~ 2025 the original author or authors. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
*
- Copyright 2017 ~ 2025 the original author or authors[983708408@qq.com]. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Index ¶
- Constants
- func Fill(v interface{}) error
- func GetConfig(path ...interface{}) jsoniter.Any
- func IgnorePrefix()
- func InitGlobalConfig(path string)
- func RefreshConfig(config *GlobalProperties)
- type CassandraIndicatorProperties
- type Config
- type ConsulIndicatorProperties
- type DockerIndicatorProperties
- type ElasticSearchIndicatorProperties
- type EmqIndicatorProperties
- type Env
- type EtcdIndicatorProperties
- type GlobalProperties
- type HttpTransportProperties
- type IndicatorProperties
- type KafkaIndicatorProperties
- type KafkaTransportProperties
- type LogItemProperties
- type LoggingProperties
- type MemcachedIndicatorProperties
- type MesosIndicatorProperties
- type MongodbIndicatorProperties
- type MySQLIndicatorProperties
- type OpenTSDBIndicatorProperties
- type PhysicalIndicatorProperties
- type PolicyProperties
- type PostgreSQLIndicatorProperties
- type RabbitMQIndicatorProperties
- type RedisIndicatorProperties
- type RocketMQIndicatorProperties
- type TransportProperties
- type ZookeeperIndicatorProperties
Constants ¶
View Source
const ( // Used for metric filtering checks. // See: ./pkg/indicators/metric_builder.go#NewMetric() IndicatorFiledName = "Indicator" )
View Source
const ( // Used for metric filtering checks. // See: ./pkg/indicators/metric_builder.go#NewMetric() MetricExcludeFieldName = "MetricExclude" )
Variables ¶
This section is empty.
Functions ¶
func IgnorePrefix ¶
func IgnorePrefix()
Types ¶
type CassandraIndicatorProperties ¶
type CassandraIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator Cassandra properties.
type ConsulIndicatorProperties ¶
type ConsulIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator consul properties.
type DockerIndicatorProperties ¶
type DockerIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator docker properties.
type ElasticSearchIndicatorProperties ¶
type ElasticSearchIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator elastic-search properties.
type EmqIndicatorProperties ¶
type EmqIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator emq properties.
type EtcdIndicatorProperties ¶
type EtcdIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator etcd properties.
type GlobalProperties ¶
type GlobalProperties struct { Logging LoggingProperties `yaml:"logging"` Transport TransportProperties `yaml:"transport"` Indicator IndicatorProperties `yaml:"indicator"` }
--------------------- Global properties ---------------------
var ( // Global config. GlobalConfig GlobalProperties // Local hardware addr ID. LocalHardwareAddrId = "" )
type HttpTransportProperties ¶
type HttpTransportProperties struct {
ServerGateway string `yaml:"server-gateway"`
}
type IndicatorProperties ¶
type IndicatorProperties struct { Namespace string `yaml:"namespace"` Netcard string `yaml:"netcard"` Physical PhysicalIndicatorProperties `yaml:"host"` Docker DockerIndicatorProperties `yaml:"docker"` Mesos MesosIndicatorProperties `yaml:"mesos"` Zookeeper ZookeeperIndicatorProperties `yaml:"zookeeper"` Etcd EtcdIndicatorProperties `yaml:"etcd"` Consul ConsulIndicatorProperties `yaml:"consul"` Kafka KafkaIndicatorProperties `yaml:"kafka"` Emq EmqIndicatorProperties `yaml:"emq"` RabbitMQ RabbitMQIndicatorProperties `yaml:"rabbitmq"` RocketMQ RocketMQIndicatorProperties `yaml:"rocketmq"` Redis RedisIndicatorProperties `yaml:"redis"` Memcached MemcachedIndicatorProperties `yaml:"memcached"` ElasticSearch ElasticSearchIndicatorProperties `yaml:"elasticsearch"` Mongodb MongodbIndicatorProperties `yaml:"mongodb"` MySQL MySQLIndicatorProperties `yaml:"mysql"` PostgreSQL PostgreSQLIndicatorProperties `yaml:"postgresql"` OpenTSDB OpenTSDBIndicatorProperties `yaml:"opentsdb"` Cassandra CassandraIndicatorProperties `yaml:"cassandra"` }
type KafkaIndicatorProperties ¶
type KafkaIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` Servers string `yaml:"servers"` UseSASL bool `yaml:"useSASL"` UseSASLHandshake bool `yaml:"useSASLHandshake"` SaslUsername string `yaml:"saslUsername"` SaslPassword string `yaml:"saslPassword"` UseTLS bool `yaml:"useTLS"` TlsCAFile string `yaml:"tlsCAFile"` TlsCertFile string `yaml:"tlsCertFile"` TlsKeyFile string `yaml:"tlsKeyFile"` TlsInsecureSkipTLSVerify bool `yaml:"tlsInsecureSkipTLSVerify"` KafkaVersion string `yaml:"kafkaVersion"` UseZooKeeperLag bool `yaml:"useZooKeeperLag"` UriZookeeper []string `yaml:"uriZookeeper"` Labels string `yaml:"labels"` MetadataRefreshInterval string `yaml:"metadataRefreshInterval"` MetricExclude string `yaml:"metric-exclude"` }
Indicator kafka properties.
type LogItemProperties ¶
type LogItemProperties struct { FileName string `yaml:"file"` Level string `yaml:"level"` Policy PolicyProperties `yaml:"policy"` }
LogItem properties.
type LoggingProperties ¶
type LoggingProperties struct {
LogItems map[string]LogItemProperties `yaml:"log-items"`
}
Multi log properties.
type MemcachedIndicatorProperties ¶
type MemcachedIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator memcached properties.
type MesosIndicatorProperties ¶
type MesosIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator mesos properties.
type MongodbIndicatorProperties ¶
type MongodbIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator Mongodb properties.
type MySQLIndicatorProperties ¶
type MySQLIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator MySQL properties.
type OpenTSDBIndicatorProperties ¶
type OpenTSDBIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator OpenTSDB properties.
type PhysicalIndicatorProperties ¶
type PhysicalIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` NetPorts string `yaml:"range-port"` MetricExclude string `yaml:"metric-exclude"` }
Indicator host properties.
type PolicyProperties ¶
type PolicyProperties struct { RetentionDays int `yaml:"retention-days"` MaxBackups int `yaml:"max-backups"` MaxSize int `yaml:"max-size"` }
Logging archive policy.
type PostgreSQLIndicatorProperties ¶
type PostgreSQLIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator PostgreSQL properties.
type RabbitMQIndicatorProperties ¶
type RabbitMQIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator rabbitMQ properties.
type RedisIndicatorProperties ¶
type RedisIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` Servers string `yaml:"servers"` Password string `yaml:"password"` MetricExclude string `yaml:"metric-exclude"` }
Indicator redis properties.
type RocketMQIndicatorProperties ¶
type RocketMQIndicatorProperties struct { Enabled bool `yaml:"enabled"` Delay time.Duration `yaml:"delay"` MetricExclude string `yaml:"metric-exclude"` }
Indicator rocketMQ properties.
type TransportProperties ¶
type TransportProperties struct { Http HttpTransportProperties `yaml:"http"` Kafka KafkaTransportProperties `yaml:"kafka"` }
Click to show internal directories.
Click to hide internal directories.