-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fmt import path, modify control and debug scripts
- Loading branch information
Showing
12 changed files
with
140 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
# anteye | ||
anteye is a small and simple monitor system. anteye should monitor cluster less then 50 instances. it can send notice msgs via **mail**、**sms** or **callback**. | ||
anteye is a small and simple monitor system. anteye should monitor cluster less then 50 instances. it can send notice msgs via **mail**、**sms** or **callback(TODO)**. | ||
we suggest you deploy more than one anteye instances in the production environment. | ||
|
||
## install | ||
install from src | ||
|
||
You can install anteye from the latest [release](), | ||
|
||
```bash | ||
# download release | ||
wget -q | ||
|
||
# config, change configs as you like | ||
mv cfg.example.json cfg.json | ||
vim cfg.json | ||
... | ||
|
||
# start | ||
./control start | ||
|
||
# stop | ||
./control stop | ||
|
||
``` | ||
|
||
Or you can install anteye from scratch | ||
|
||
```bash | ||
# download src | ||
git clone [email protected]:niean/anteys.git | ||
|
@@ -54,7 +75,7 @@ monitor | |
``` | ||
|
||
## interface | ||
anteye sends alarm msgs via http interfaces. these interfaces defined as followings: | ||
anteye sends msgs via http interfaces. these interfaces defined as followings: | ||
|
||
```bash | ||
# sms interface | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,12 @@ | |
}, | ||
"mail" : { | ||
"enable": true, | ||
"url" : "http://tycloudstart.com:1986/mail/sender", | ||
"receivers" : "[email protected],nieanan3602@163.com" | ||
"url" : "http://mail.server:1986/mail/sender", | ||
"receivers" : "[email protected],niean.sail@gmail.com" | ||
}, | ||
"sms" : { | ||
"enable": true, | ||
"url" : "http://tycloudstart.com:1986/sms/sender", | ||
"enable": false, | ||
"url" : "http://sms.server:1986/sms/sender", | ||
"receivers" : "18001163885,13811685238" | ||
}, | ||
"callback" : { | ||
|
@@ -20,9 +20,9 @@ | |
}, | ||
"monitor" : { | ||
"cluster" : [ | ||
"transfer,127.0.0.1:6060/health", | ||
"task,127.0.0.1:16269/health", | ||
"graph,127.0.0.1:6071/health" | ||
"transfer,test.hostname01:6060/health", | ||
"task,test.hostname01:8002/health", | ||
"graph,test.hostname01:6071/health" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package g | ||
const ( | ||
COMMIT = "08f9111" | ||
COMMIT = "34f69f7" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
package http | ||
|
||
import ( | ||
"github.com/niean/anteye/proc" | ||
"net/http" | ||
|
||
"github.com/niean/anteye/proc" | ||
) | ||
|
||
func configProcHttpRoutes() { | ||
// counter | ||
http.HandleFunc("/counter/all", func(w http.ResponseWriter, r *http.Request) { | ||
RenderDataJson(w, proc.GetAll()) | ||
}) | ||
// TO BE DISCARDed | ||
http.HandleFunc("/statistics/all", func(w http.ResponseWriter, r *http.Request) { | ||
RenderDataJson(w, proc.GetAll()) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.