mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-09 14:34:36 +02:00
Allow /metrics on default port; reduce memory if not enabled
This commit is contained in:
parent
bb3fe4f830
commit
358b344916
9 changed files with 184 additions and 125 deletions
server
|
@ -83,12 +83,10 @@ func (s *Server) execManager() {
|
|||
"emails_sent_failure": sentMailFailure,
|
||||
}).
|
||||
Info("Server stats")
|
||||
if s.httpMetricsServer != nil {
|
||||
metrics.messagesCached.Set(float64(messagesCached))
|
||||
metrics.visitors.Set(float64(visitorsCount))
|
||||
metrics.subscribers.Set(float64(subscribers))
|
||||
metrics.topics.Set(float64(topicsCount))
|
||||
}
|
||||
mset(metricMessagesCached, messagesCached)
|
||||
mset(metricVisitors, visitorsCount)
|
||||
mset(metricSubscribers, subscribers)
|
||||
mset(metricTopics, topicsCount)
|
||||
}
|
||||
|
||||
func (s *Server) pruneVisitors() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue