Documentation ¶
Index ¶
- Constants
- func GetProjectSubs(projectUUID string, store stores.Store) (int64, error)
- func GetProjectSubsACL(projectUUID string, username string, store stores.Store) (int64, error)
- func GetProjectSubsByTopic(projectUUID string, topic string, store stores.Store) (int64, error)
- func GetProjectTopics(projectUUID string, store stores.Store) (int64, error)
- func GetProjectTopicsACL(projectUUID string, username string, store stores.Store) (int64, error)
- func GetTimeNowZulu() string
- type Metric
- func NewDailyProjectMsgCount(project string, timePoints []Timepoint) Metric
- func NewDailyTopicMsgCount(topic string, timePoints []Timepoint) Metric
- func NewOpNodeCPU(hostname string, value float64, tstamp string) Metric
- func NewOpNodeMEM(hostname string, value float64, tstamp string) Metric
- func NewProjectSubs(project string, value int64, tstamp string) Metric
- func NewProjectTopics(project string, value int64, tstamp string) Metric
- func NewProjectUserSubs(project string, user string, value int64, tstamp string) Metric
- func NewProjectUserTopics(project string, user string, value int64, tstamp string) Metric
- func NewSubBytes(topic string, value int64, tstamp string) Metric
- func NewSubMsgs(topic string, value int64, tstamp string) Metric
- func NewSubRate(sub string, value float64, tstamp string) Metric
- func NewTopicBytes(topic string, value int64, tstamp string) Metric
- func NewTopicMsgs(topic string, value int64, tstamp string) Metric
- func NewTopicRate(topic string, value float64, tstamp string) Metric
- func NewTopicSubs(topic string, value int64, tstamp string) Metric
- type MetricList
- func AggrProjectUserSubs(projectUUID string, store stores.Store) (MetricList, error)
- func AggrProjectUserTopics(projectUUID string, store stores.Store) (MetricList, error)
- func GetMetricsFromJSON(input []byte) (MetricList, error)
- func GetUsageCpuMem(store stores.Store) (MetricList, error)
- func NewMetricList(m Metric) MetricList
- type Timepoint
Constants ¶
View Source
const ( DescProjectTopics = "Counter that displays the number of topics belonging to the specific project" NameProjectTopics = "project.number_of_topics" DescProjectSubs = "Counter that displays the number of subscriptions belonging to the specific project" NameProjectSubs = "project.number_of_subscriptions" NameDailyProjectMsgs = "project.number_of_daily_messages" DescDailyProjectMsgs = "A collection of counters that represents the total number of messages published each day to all of the project's topics" DescTopicSubs = "Counter that displays the number of subscriptions belonging to a specific topic" NameTopicSubs = "topic.number_of_subscriptions" DescTopicRate = "A rate that displays how many messages were published per second between the last two publish events" NameTopicRate = "topic.publishing_rate" DescSubRate = "A rate that displays how many messages were consumed per second between the last two consume events" NameSubRate = "subscription.consumption_rate" DescTopicMsgs = "Counter that displays the number of messages published to the specific topic" NameTopicMsgs = "topic.number_of_messages" DescDailyTopicMsgs = "A collection of counters that represents the total number of messages published each day to a specific topic" NameDailyTopicMsgs = "topic.number_of_daily_messages" DescTopicBytes = "Counter that displays the total size of data (in bytes) published to the specific topic" NameTopicBytes = "topic.number_of_bytes" DescProjectUserSubs = "Counter that displays the number of subscriptions that a user has access to the specific project" NameProjectUserSubs = "project.user.number_of_subscriptions" DescProjectUserTopics = "Counter that displays the number of topics that a user has access to the specific project" NameProjectUserTopics = "project.user.number_of_topics" DescSubMsgs = "Counter that displays the number of messages consumed from the specific subscription" NameSubMsgs = "subscription.number_of_messages" DescSubBytes = "Counter that displays the total size of data (in bytes) consumed from the specific subscription" NameSubBytes = "subscription.number_of_bytes" DescOpNodeCPU = "Percentage value that displays the CPU usage of ams service in the specific node" NameOpNodeCPU = "ams_node.cpu_usage" DescOpNodeMEM = "Percentage value that displays the Memory usage of ams service in the specific node" NameOpNodeMEM = "ams_node.memory_usage" )
Metric names and descriptions
Variables ¶
This section is empty.
Functions ¶
func GetProjectSubsACL ¶
func GetProjectSubsByTopic ¶
func GetProjectTopics ¶
func GetProjectTopicsACL ¶
func GetTimeNowZulu ¶
func GetTimeNowZulu() string
Types ¶
type Metric ¶
type Metric struct { Metric string `json:"metric"` MetricType string `json:"metric_type"` ValueType string `json:"value_type"` ResourceType string `json:"resource_type"` Resource string `json:"resource_name"` Timeseries []Timepoint `json:"timeseries"` Description string `json:"description"` }
func NewDailyProjectMsgCount ¶
func NewDailyTopicMsgCount ¶
func NewOpNodeCPU ¶
Initialize single point timeseries with the latest timestamp and value
func NewProjectUserSubs ¶
func NewProjectUserTopics ¶
func (*Metric) ExportJSON ¶
ExportJSON exports whole ProjectTopic structure
type MetricList ¶
type MetricList struct {
Metrics []Metric `json:"metrics"`
}
func AggrProjectUserSubs ¶
func AggrProjectUserSubs(projectUUID string, store stores.Store) (MetricList, error)
func AggrProjectUserTopics ¶
func AggrProjectUserTopics(projectUUID string, store stores.Store) (MetricList, error)
func GetMetricsFromJSON ¶
func GetMetricsFromJSON(input []byte) (MetricList, error)
GetUserFromJSON retrieves User info From JSON string
func GetUsageCpuMem ¶
func GetUsageCpuMem(store stores.Store) (MetricList, error)
func NewMetricList ¶
func NewMetricList(m Metric) MetricList
func (*MetricList) ExportJSON ¶
func (ml *MetricList) ExportJSON() (string, error)
ExportJSON exports whole ProjectTopic structure
type Timepoint ¶
type Timepoint struct { Timestamp string `json:"timestamp"` Value interface{} `json:"value"` }
func GetDailyProjectMsgCount ¶
Click to show internal directories.
Click to hide internal directories.