nsqadmin

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 30 Imported by: 54

README

nsqadmin

nsqadmin is a Web UI to view aggregated cluster stats in realtime and perform various administrative tasks.

Read the docs

Local Development

Dependencies

  1. Install NodeJS 16.x (includes npm)

Live Reload Workflow

  1. $ npm install
  2. $ ./gulp --series clean watch
  3. $ cd .. && make && ./build/nsqadmin --dev-static-dir=nsqadmin/static/build --lookupd-http-address=<...>
  4. make changes to static assets (repeat step 3 only if you make changes to any Go code)

Build

  1. $ ./gulp --series clean build

Documentation

Index

Constants

View Source
const (
	LOG_DEBUG = lg.DEBUG
	LOG_INFO  = lg.INFO
	LOG_WARN  = lg.WARN
	LOG_ERROR = lg.ERROR
	LOG_FATAL = lg.FATAL
)

Variables

This section is empty.

Functions

func NewHTTPServer added in v0.2.25

func NewHTTPServer(nsqadmin *NSQAdmin) *httpServer

func NewSingleHostReverseProxy added in v0.2.16

func NewSingleHostReverseProxy(target *url.URL, connectTimeout time.Duration, requestTimeout time.Duration) *httputil.ReverseProxy

this is similar to httputil.NewSingleHostReverseProxy except it passes along basic auth

Types

type AdminAction added in v0.2.17

type AdminAction struct {
	Action    string `json:"action"`
	Topic     string `json:"topic"`
	Channel   string `json:"channel,omitempty"`
	Node      string `json:"node,omitempty"`
	Timestamp int64  `json:"timestamp"`
	User      string `json:"user,omitempty"`
	RemoteIP  string `json:"remote_ip"`
	UserAgent string `json:"user_agent"`
	URL       string `json:"url"` // The URL of the HTTP request that triggered this action
	Via       string `json:"via"` // the Hostname of the nsqadmin performing this action
}

type Logger added in v1.1.0

type Logger lg.Logger

type NSQAdmin added in v0.2.25

type NSQAdmin struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New added in v0.3.6

func New(opts *Options) (*NSQAdmin, error)

func (*NSQAdmin) Exit added in v0.2.25

func (n *NSQAdmin) Exit()

func (*NSQAdmin) Main added in v0.2.25

func (n *NSQAdmin) Main() error

func (*NSQAdmin) RealHTTPAddr added in v0.3.3

func (n *NSQAdmin) RealHTTPAddr() *net.TCPAddr

type Options added in v0.3.6

type Options struct {
	LogLevel  lg.LogLevel `flag:"log-level"`
	LogPrefix string      `flag:"log-prefix"`
	Logger    Logger

	HTTPAddress string `flag:"http-address"`
	BasePath    string `flag:"base-path"`

	DevStaticDir string `flag:"dev-static-dir"`

	GraphiteURL   string `flag:"graphite-url"`
	ProxyGraphite bool   `flag:"proxy-graphite"`

	StatsdPrefix        string `flag:"statsd-prefix"`
	StatsdCounterFormat string `flag:"statsd-counter-format"`
	StatsdGaugeFormat   string `flag:"statsd-gauge-format"`

	StatsdInterval time.Duration `flag:"statsd-interval"`

	NSQLookupdHTTPAddresses []string `flag:"lookupd-http-address" cfg:"nsqlookupd_http_addresses"`
	NSQDHTTPAddresses       []string `flag:"nsqd-http-address" cfg:"nsqd_http_addresses"`

	HTTPClientConnectTimeout time.Duration `flag:"http-client-connect-timeout"`
	HTTPClientRequestTimeout time.Duration `flag:"http-client-request-timeout"`

	HTTPClientTLSInsecureSkipVerify bool   `flag:"http-client-tls-insecure-skip-verify"`
	HTTPClientTLSRootCAFile         string `flag:"http-client-tls-root-ca-file"`
	HTTPClientTLSCert               string `flag:"http-client-tls-cert"`
	HTTPClientTLSKey                string `flag:"http-client-tls-key"`

	AllowConfigFromCIDR string `flag:"allow-config-from-cidr"`

	NotificationHTTPEndpoint string `flag:"notification-http-endpoint"`

	ACLHTTPHeader string   `flag:"acl-http-header"`
	AdminUsers    []string `flag:"admin-user" cfg:"admin_users"`
}

func NewOptions added in v0.3.6

func NewOptions() *Options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL