Skip to content

Commit f3ddf6b

Browse files
committed
update readme
1 parent 0c45d38 commit f3ddf6b

File tree

1 file changed

+112
-9
lines changed

1 file changed

+112
-9
lines changed

README.md

Lines changed: 112 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,40 +34,40 @@ choose the binary from the release according to your platform, for example for t
3434
#### Download binary
3535

3636
```shell
37-
$ wget https://github.com/telkomdev/tob/releases/download/1.1.0/tob-1.1.0.linux-amd64.tar.gz
37+
$ wget https://github.com/telkomdev/tob/releases/download/1.2.0/tob-1.2.0.linux-amd64.tar.gz
3838
```
3939

4040
#### Important !!!, always check the SHA256 Checksum before using it
4141

42-
Download `sha256sum.txt` according to the binary version you downloaded https://github.com/telkomdev/tob/releases/download/1.1.0/sha256sums.txt
42+
Download `sha256sum.txt` according to the binary version you downloaded https://github.com/telkomdev/tob/releases/download/1.2.0/sha256sums.txt
4343

4444
```shell
45-
$ wget https://github.com/telkomdev/tob/releases/download/1.1.0/sha256sums.txt
45+
$ wget https://github.com/telkomdev/tob/releases/download/1.2.0/sha256sums.txt
4646
```
4747

4848
#### Verify SHA256 Checksum
4949

5050
Linux
5151

5252
```shell
53-
$ sha256sum tob-1.1.0.linux-amd64.tar.gz -c sha256sums.txt
54-
tob-1.1.0.linux-amd64.tar.gz: OK
53+
$ sha256sum tob-1.2.0.linux-amd64.tar.gz -c sha256sums.txt
54+
tob-1.2.0.linux-amd64.tar.gz: OK
5555
```
5656

5757
Mac OSX
5858

5959
```shell
60-
$ shasum -a 256 tob-1.1.0.darwin-amd64.tar.gz -c sha256sums.txt
61-
tob-1.1.0.darwin-amd64.tar.gz: OK
60+
$ shasum -a 256 tob-1.2.0.darwin-amd64.tar.gz -c sha256sums.txt
61+
tob-1.2.0.darwin-amd64.tar.gz: OK
6262
```
6363

64-
You should be able to see that the checksum value for the file is valid, `tob-1.1.0.linux-amd64.tar.gz: OK` and `tob-1.1.0.darwin-amd64.tar.gz: OK`.
64+
You should be able to see that the checksum value for the file is valid, `tob-1.2.0.linux-amd64.tar.gz: OK` and `tob-1.2.0.darwin-amd64.tar.gz: OK`.
6565
Indicates the file is not damaged, not modified and safe to use.
6666

6767
#### Extract
6868

6969
```shell
70-
$ tar -xvzf tob-1.1.0.linux-amd64.tar.gz
70+
$ tar -xvzf tob-1.2.0.linux-amd64.tar.gz
7171
```
7272

7373
#### Run
@@ -111,6 +111,7 @@ currently tob supports below `KIND` of services
111111
- **postgresql**
112112
- **redis**
113113
- **web**
114+
- **diskstatus**
114115

115116
`KIND` represents one or many services. So you can monitor more than one service with the same `KIND`. For example, you can monitor multiple PostgreSQL instances. Or you can monitor multiple web applications.
116117

@@ -150,6 +151,108 @@ currently tob supports below `KIND` of services
150151
}
151152
```
152153

154+
### Disk Status Monitoring
155+
156+
To monitor `Disk Status` on a Server Computer, `tob` requires a special `agent` that can be called by `tob`.
157+
So we need to deploy an `agent`, in this case `tob-http-agent` to the Server Computer whose `Disk Status` we need to monitor.
158+
159+
#### Download `tob-http-agent` binary
160+
161+
```shell
162+
$ wget https://github.com/telkomdev/tob/releases/download/1.2.0/tob-http-agent-1.0.0.linux-amd64.tar.gz
163+
```
164+
165+
#### Important !!!, always check the SHA256 Checksum before using it
166+
167+
Download `tob-http-agent-sha256sums.txt` according to the binary version you downloaded https://github.com/telkomdev/tob/releases/download/1.2.0/tob-http-agent-sha256sums.txt
168+
169+
```shell
170+
$ wget https://github.com/telkomdev/tob/releases/download/1.2.0/tob-http-agent-sha256sums.txt
171+
```
172+
173+
#### Verify `tob-http-agent` SHA256 Checksum
174+
175+
Linux
176+
177+
```shell
178+
$ sha256sum tob-http-agent-1.0.0.linux-amd64.tar.gz -c tob-http-agent-sha256sums.txt
179+
tob-http-agent-1.0.0.linux-amd64.tar.gz: OK
180+
```
181+
182+
#### Extract `tob-http-agent`
183+
184+
```shell
185+
$ tar -xvzf tob-http-agent-1.0.0.linux-amd64.tar.gz
186+
```
187+
188+
#### Run `tob-http-agent` as a daemon with `systemd`
189+
190+
Create `tob-http-agent.service` `systemd` unit service
191+
```shell
192+
$ sudo vi /etc/systemd/system/tob-http-agent.service
193+
```
194+
195+
Copy content from this file to the `/etc/systemd/system/tob-http-agent.service` and save
196+
```
197+
https://github.com/telkomdev/tob/blob/master/deployments/systemd/tob-http-agent.service
198+
```
199+
200+
Reload `systemd daemon`
201+
```shell
202+
$ sudo systemctl daemon-reload
203+
```
204+
205+
Start `tob-http-agent` service
206+
```shell
207+
$ sudo systemctl start tob-http-agent
208+
```
209+
210+
Check if its running
211+
```shell
212+
$ sudo systemctl status tob-http-agent
213+
```
214+
215+
#### Expose `tob-http-agent` service with `nginx`
216+
217+
Create `tob-http-agent.conf`
218+
```shell
219+
$ sudo vi /etc/nginx/sites-available/tob-http-agent.conf
220+
```
221+
222+
Copy content from this file to the `/etc/nginx/sites-available/tob-http-agent.conf` and save
223+
```
224+
https://github.com/telkomdev/tob/blob/master/deployments/nginx/tob-http-agent-nginx.conf
225+
```
226+
227+
Create `/etc/nginx/sites-available/tob-http-agent.conf` symlink
228+
```shell
229+
$ sudo ln -s /etc/nginx/sites-available/tob-http-agent.conf /etc/nginx/sites-enabled/
230+
```
231+
232+
Make sure the `nginx` configuration is not error
233+
```shell
234+
$ sudo nginx -t
235+
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
236+
nginx: configuration file /etc/nginx/nginx.conf test is successful
237+
```
238+
239+
Restart `nginx`
240+
```shell
241+
$ sudo systemctl restart nginx
242+
```
243+
244+
#### Add `diskstatus` config to the `tob` service config
245+
246+
```json
247+
"ubuntu_1_storage_status": {
248+
"kind": "diskstatus",
249+
"url": "http://tob-http-agent.yourdomain.com",
250+
"checkInterval": 5,
251+
"thresholdDiskUsage": 90,
252+
"enable": true
253+
}
254+
```
255+
153256
### Notificator
154257

155258
Currently tob supports the following types of `Notificator`. `Notificator` is where the tob will send notifications when one or more of the services you're monitoring have problems.

0 commit comments

Comments
 (0)