Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
Telegram Notifications
« previous
next »
Print
Pages:
1
2
3
[
4
]
5
Author
Topic: Telegram Notifications (Read 14168 times)
Fright
Hero Member
Posts: 1777
Karma: 164
Re: Telegram Notifications
«
Reply #45 on:
January 04, 2024, 08:04:45 pm »
@halasizs
more feedback - more chances )
you can test it (
https://forum.opnsense.org/index.php?topic=36805.msg184572#msg184572
)
and share your opinion
I still don't know if it makes sense to make a PR for it
Logged
halasizs
Newbie
Posts: 10
Karma: 0
Re: Telegram Notifications
«
Reply #46 on:
January 04, 2024, 09:01:03 pm »
Well, now I'm not in the mood for opnsession. After refreshing /23.10_1-> 23.11/ the web interface does not load.
https://192.168
.0.1 . SSH disabled, I can't reach it. Luckily I have internet and it is not interrupted.
On restart 2x the situation was unchanged. The weekend programme is here.
I know I shouldn't be writing here, but I'm angry. Sorry.
Logged
vrabac
Newbie
Posts: 3
Karma: 0
Re: Telegram Notifications
«
Reply #47 on:
January 05, 2024, 09:04:41 am »
I was looking for this, and seems it works, at least the Test is working. I am not sure how to trigger some alarms manually over cli.
One thing maybe to consider, when entering the Token and Chat ID and pressing Test, without saving settings firstly, will trow an error message, not sure is this by design or it should say please save first then do test messages.
Logged
Fright
Hero Member
Posts: 1777
Karma: 164
Re: Telegram Notifications
«
Reply #48 on:
January 05, 2024, 08:00:47 pm »
@vrabac
Thanks!
I'll take a look - may be its better to send test message with the form values and not from config values (so it's possible to test settings without saving to config)
«
Last Edit: January 05, 2024, 08:48:21 pm by Fright
»
Logged
vrabac
Newbie
Posts: 3
Karma: 0
Re: Telegram Notifications
«
Reply #49 on:
January 05, 2024, 08:28:26 pm »
@Fright
That would even be better, to use values from Form and not from config, as in initial setup there is no values in config, and I guess because of that there is that error then trying to test.
Do you know the way to trigger some test in CLI to see this in action. I changed all monit Services Test Settings (11 by default) to Execute and that path, but would like to see this in real action
. I am also loking for some more monit Services Test.
Logged
Fright
Hero Member
Posts: 1777
Karma: 164
Re: Telegram Notifications
«
Reply #50 on:
January 05, 2024, 08:45:24 pm »
edit(say 15%)\enable CPUUsageTest and run something cpu-consuming. like IDS rulesets update )
good example of shell quick test (via logs monitoring):
https://mephiz.sh/2023/06/10/opnarp-telegram#monit-settings
Logged
kozistan
Newbie
Posts: 47
Karma: 2
Have you tried turning it off and on again?
Re: Telegram Notifications
«
Reply #51 on:
January 07, 2024, 08:28:51 pm »
Hi Fright, this is working for me. As i press apply on MONIT setting i get message regarding CPUUsage, but just once after apply. No other messages regarding CPUUsage are coming, even the load is more that 15%
Logged
Fright
Hero Member
Posts: 1777
Karma: 164
Re: Telegram Notifications
«
Reply #52 on:
January 07, 2024, 09:26:21 pm »
@kozistan
Hi! any clue in monit log?
matches and actions should be visible in monit log with Info (and above) severity level selected
Logged
kozistan
Newbie
Posts: 47
Karma: 2
Have you tried turning it off and on again?
Re: Telegram Notifications
«
Reply #53 on:
January 07, 2024, 09:55:23 pm »
That is correct, log is full of reports. Please check the attached screenshot.
Logged
Fright
Hero Member
Posts: 1777
Karma: 164
Re: Telegram Notifications
«
Reply #54 on:
January 07, 2024, 10:21:15 pm »
after the 'SYSTEM' cpu usage of **% matches resource limit ' message there should be messages like:
'SYSTEM' exec: '/usr/local/opnsense/scripts/OPNsense/Monit2T/monit2t.sh' (with Info severity) if action is set for the service test and then
'Telegram message sent' with Notice severity (if message is sent) or
'Telegram API endpoint returned error..' with Error severity if something goes wrong
Logged
kozistan
Newbie
Posts: 47
Karma: 2
Have you tried turning it off and on again?
Re: Telegram Notifications
«
Reply #55 on:
January 07, 2024, 10:28:14 pm »
screenshot from my config + message on telegram
Logged
Fright
Hero Member
Posts: 1777
Karma: 164
Re: Telegram Notifications
«
Reply #56 on:
January 07, 2024, 11:35:18 pm »
ah. this is how Monit works.
exec (and Alert) action triggers once on state change (or 'repeat every XXX cycle(s)' should be used) .
so cpu usage should drop below threshold first, then exec will work on next match.
you can see in log that your cpu usage is above threshold on every poll
Logged
kozistan
Newbie
Posts: 47
Karma: 2
Have you tried turning it off and on again?
Re: Telegram Notifications
«
Reply #57 on:
January 08, 2024, 12:19:04 am »
just checked the service monit status is not reseting after it reaches the limit. it's stuck somewhere
Also tried 3 CYCLES with no change.
Logged
Fright
Hero Member
Posts: 1777
Karma: 164
Re: Telegram Notifications
«
Reply #58 on:
January 08, 2024, 08:07:05 am »
try to set CpuLoad to 25% - i think you will see how it works
Logged
kozistan
Newbie
Posts: 47
Karma: 2
Have you tried turning it off and on again?
Re: Telegram Notifications
«
Reply #59 on:
January 08, 2024, 08:25:51 pm »
thanks @Fright. I did not even changed the value, i've just duplicated those default tests with execute option and everything is working. No issues and can tell you i was sleeping better before, soon I'm going to turn monit off
So yes, monit is working with telegram with no issues. At least for me
Logged
Print
Pages:
1
2
3
[
4
]
5
« previous
next »
OPNsense Forum
»
Archive
»
23.7 Legacy Series
»
Telegram Notifications