honeypot.go 625 B

1234567891011121314151617181920212223
  1. package honeypot
  2. import (
  3. "time"
  4. "github.com/prometheus/client_golang/prometheus"
  5. "github.com/prometheus/client_golang/prometheus/promauto"
  6. )
  7. var Timings = promauto.NewHistogramVec(prometheus.HistogramOpts{
  8. Namespace: "anubis",
  9. Subsystem: "honeypot",
  10. Name: "pagegen_timings",
  11. Help: "The amount of time honeypot page generation takes per method",
  12. Buckets: prometheus.ExponentialBuckets(0.5, 2, 32),
  13. }, []string{"method"})
  14. type Info struct {
  15. CreatedAt time.Time `json:"createdAt"`
  16. UserAgent string `json:"userAgent"`
  17. IPAddress string `json:"ipAddress"`
  18. HitCount int `json:"hitCount"`
  19. }