New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Nodewatch Modification
rethinkvps
Member
in Help
Hello,
I would like to make my nodewatch not only email me but POST to a PHP script or something similar, I wanted to check the code and it is encrypted and I really don't have the time to decrypt it as I don't have the tools to do it while I am on the move.
Is anyone aware of a script or atleast the details to allow me to do this myself? I did email the dev but I have not received a response as of yet.
Comments
You are not able to do that.
That sucks, I was hoping I could just edit his script somehow.
Do people really use webhooks?
Yes, I thought it would be useful for an idea I had.
As a workaround, you can use mandrill/mailgun, set an incoming email and set it to post to your PHP file, you can then process that notification email.
if i may ask what was the feature i been working on a monitoring application and been debating to add webhooks or not into the alerting system.
@wojons: Webhooks at the very least it would let you really make good use of Rage4 DNS failover capabilities. I have been using UptimeRobot to do it but it only goes down to 5 minutes. I was working on my own script so I can get it down to 2 minutes.
that is something i can consider and pushing to do it sooner then later.
IMHO you want as much external/notification capabilities as possible. Check out UptimeRobot's dashboard, they have quite a few methods that cover many notification bases.
One thing you could do is pipe your email to a script which performs the POST. For example, in Postfix you can edit aliases (the email contents will be sent to the script):
Thanks for the advice i use there service so i should check it out again.
Other grey-area option is to decrypt the php scripts and modify them. However I can say they are definitely PHP4 style and use zero OOP.
You're free to modify this instead:
https://github.com/LoadingDeck/Monitoring
It's not quite the same but better than starting from 0 and actually legal.
The best way to do this ATM is to parse /var/log/nodewatch_events.log
Custom hooks are planned