Ivan Kozlovic
773b25af85
[FIXED] Shutdown stops http server when started manually
...
In case one creates a server instance with New() and then starts
the http server manually (s.StartHTTPMonitoring()), calling
s.Shutdown() would not stop the http server because Shutdown()
would return without doing anything if `running` was not true.
This boolean was set to true only in `s.Start()`.
Also added StartMonitoring() to perform the options check and
selectively start http or https server to replace individual calls.
This is useful for NATS Streaming server that will now be able
to call s.StartMonitoring() without having to duplicate code
about options checks and http server code.
This is related to PR #481
2017-05-25 17:01:35 -06:00
Ivan Kozlovic
513c0a0971
[FIXED] Specifying HTTP and HTTPs ports produces unexpected behavior
...
The server will now print a Fatal error if user tries to configure
both HTTP and HTTPs ports.
Resolves #495
2017-05-24 13:06:04 -06:00
Colin Sullivan
efbd423e96
Updates based on comments.
2017-03-01 20:46:47 -07:00
Colin Sullivan
3f8a0d8b4a
Use atomic.Load to access fields used in /varz and /subsz requests.
...
* Includes a unit test that checks all endpoints for data races.
2017-03-01 16:13:20 -07:00
Derek Collison
61e0b758d7
Updates for Go client rename, update vendor dependencies
2016-11-20 13:15:37 -08:00
Ivan Kozlovic
645529243f
Fix staticcheck reported issues
...
The tool is started with the "-ignore" flag to ignore warning SA2002
which corresponds to invoking t.Fatalf (and the like) in a go routine.
Calling t.Fatalf in a go routine may produce a race condition.
The rationale for ignoring this warning is that if a test executes
the t.Fatalf() line it is that we have a problem either with test
or code that should be fixed.
2016-11-15 12:54:36 -07:00
Ivan Kozlovic
2bec28e146
Fix test
...
Loop should stop whenever a valid ip is found.
2016-05-23 20:05:09 -06:00
Derek Collison
82f04baa12
Allow optional reporting of authorized user under connz
2016-05-15 10:07:37 -07:00
Derek Collison
9e73c1db76
Enable listen address parsing for client, cluster and http, enforce http hosts as separate
2016-05-12 16:47:01 -07:00
Colin Sullivan
8a07a02a97
Rename the field to 'total'.
2016-04-26 17:49:09 -06:00
Colin Sullivan
a6dfe88746
Add a live connection count to /connz monitoring.
2016-04-26 17:24:01 -06:00
Colin Sullivan
2baac47820
Address issues found by golint.
...
* No functional changes
* Did not address the ALL_CAPS issues
* Did not modify public APIs and field names.
2016-03-15 15:21:13 -06:00
Waldemar Quevedo
7ac3eae82e
Set IP and Port for connections using TLS in /connz
2016-02-15 17:40:13 -08:00
Ivan Kozlovic
b6292d6d6d
Fix monitor port usage for parallel tests.
...
Use a different MONITOR_PORT for different test packages.
2016-02-08 09:33:39 -07:00
Derek Collison
cb47c2e494
fixup for collapsed struct
2015-08-06 01:01:29 -07:00
Derek Collison
96bab33075
fixed import paths
2015-06-19 12:08:11 -07:00
Derek Collison
082a43f7ae
Additional testing for monitoring
2015-06-16 10:31:15 -07:00
Derek Collison
aabc9a2a7c
add in client lang and version reporting, bump limit
2015-06-15 20:58:59 -07:00
Máximo Cuadros Ortiz
d85225e56b
fixing http test, disabling keepalive
2014-10-06 22:11:13 +02:00
Máximo Cuadros Ortiz
502ba2e43e
connz: limit and offset
2014-10-04 22:39:09 +02:00
Máximo Cuadros Ortiz
3cde0eef60
added subsz and connz extended, and merged with varz
2014-10-04 22:38:59 +02:00
Máximo Cuadros Ortiz
9afb590cf9
improved connz with subscriptions stats and list of subscriptions by client
2014-10-04 22:38:59 +02:00
Derek Collison
9dc875b88e
pedantic about over zealous GC for sockets
2014-09-18 21:25:13 -07:00
Derek Collison
71c0c28ced
copyright hygiene
2013-10-16 13:40:15 -07:00
Derek Collison
d21e2caf8c
golint updates
2013-10-13 09:52:51 -07:00
Derek Collison
4e1502cc4c
README license, copyright cleanup, etc
2013-09-30 10:16:43 -07:00
Derek Collison
6ab5d6a337
Fixed msg payload accounting, made http monitoring work in Go routines
2013-08-19 15:09:41 -07:00
Derek Collison
cf0f30200f
log file support, data race fixes
2013-08-02 16:52:54 -07:00
Derek Collison
5a3688e3b0
Updated varz tests, added connection details
2013-01-22 10:45:27 -08:00
Derek Collison
6b2e2e82d8
Revert for travis version of Go
2013-01-22 10:00:38 -08:00
Derek Collison
fd1f6faa59
Added on /connz endpoint for monitoring
2013-01-22 09:35:46 -08:00
Derek Collison
3977043780
Added first pass http monitoring (e.g. /varz)
2013-01-02 18:11:01 -06:00