msgbyte / tianji

Tianji: Insight into everything, Website Analytics + Uptime Monitor + Server Status. not only another GA alternatives
https://tianji.msgbyte.com/
Apache License 2.0
1.62k stars 93 forks source link

feat(uptime): monitor agent #118

Open ljcbaby opened 1 month ago

ljcbaby commented 1 month ago

for multi LAN or other network limit environment.

exec monitor remotely and report to main to show and to storage.

moonrailgun commented 1 month ago

I can not get your mind, can you give some example or more explain?

ljcbaby commented 1 month ago

For my use case,I want start up one instance on my TrueNAS at home.

run an agent on openwrt to monitor tunnels which may have same dst ip so specify iface necessary.

also I want run an agent on unraid at university, because the unraid is J1900 and HDD, It is not up to the task of processing so much historical data.

moonrailgun commented 1 month ago

ic, did you have interesting to submit a PR? i have no enough device environment to test it.

just need to modify this file reporter/utils/utils.go

getTrafficVnstat

i think vnstat can do it

ljcbaby commented 1 month ago

Perhaps I did not express clearly enough, let you have some misunderstanding, let me clarify my idea.

There are three objects, the server, the agent, and the monitor object.

For some reason, the server can not connect directly to the monitoring object, or the monitoring effect of direct connection does not meet the expectation. In this case, the server sends the monitoring configuration to the agent, which executes the monitoring task and reports the data to the server.

At the same time, we can enhance the agent, such as specifying the request iface, to satisfy more complex monitoring tasks.

I think this may be a more complex requirement that needs more discussion and research.

moonrailgun commented 3 weeks ago

fine, its sound like a frp or ssh tunnel 's job.

how about use those solution to resolve your problem? i think its more commonly way.

ljcbaby commented 3 weeks ago

FRP or SSH tunnel does not seem to support ICMP forwarding.

And some options, such as ping -i <iface> , must be executed on the local machine.

moonrailgun commented 1 day ago

ok,

link a issue here: https://github.com/msgbyte/tianji/issues/133

i think its same question.