https://github.com/s8sg/go_jolokia
A Jolokia Client library for Go (with proxy mode support)
https://github.com/s8sg/go_jolokia
golang jmx jolokia proxy
Last synced: 6 months ago
JSON representation
A Jolokia Client library for Go (with proxy mode support)
- Host: GitHub
- URL: https://github.com/s8sg/go_jolokia
- Owner: s8sg
- License: mit
- Created: 2016-02-10T05:02:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-25T13:26:21.000Z (over 2 years ago)
- Last Synced: 2025-04-06T10:14:22.120Z (6 months ago)
- Topics: golang, jmx, jolokia, proxy
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 17
- Watchers: 2
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go_jolokia
```
< go_jolokia >
--------
\
\
_____ ----------------- _____
| \/ ---- ---- \/ |
\ ==/ / | | \ \== /
\--/ | () | |() | \--/
/ \---/ ___ \---/ \
| _(===)_ |
| (__/--\__) |
| |_||_| |
\ /
```go_jolokia is a Simple jolokia JMX/HTTP wrapper for Go. It supports jolokia proxy setup as well as direct host connection.
[](https://godoc.org/github.com/swarvanusg/go_jolokia)
### Version
0.1.0### Usage
#### Step 1 : Get It
To get the go_jolokia install Go and execute the below command
```
go get github.com/swarvanusg/go_jolokia
```#### Step 2 : Initiate a client
```go
client := NewJolokiaClient("http://" + proxyhost + ":" + proxyport + "/" + jolokia)client.SetTarget(targetHost + ":" + targetPort)
```#### Step 3 : Use the client for Getting Info
```go
beans, err := client.ListBeans("java.lang")props, err := client.ListProperties("java.lang", []string{"type=Threading"})
val, err := client.GetAttr("java.lang", []string{"type=Threading"}, "PeakThreadCount")
```#### Current Status:
The go_jolokia build is success
The test cases are passing#### Inspired from
github.com/cmceniry/golokia