Posts: 1,047
Threads: 42
Joined: Mar 2012
Reputation:
25
OK. Grab hold of your backup.nems file, and please perform the upgrade on a different SD card (so you can fall back if needed). NEMS 1.3 has been out of service for a while now, so I don't want you to have any issues.
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Posts: 49
Threads: 8
Joined: Oct 2017
Reputation:
5
I went ahead and restored my backup with the nems-restore script.
All went well and it looks like my old configuration has correctly been restored, apart from the 'To' address where mails should be sent.
I tested manually if I could send mails and telegrams and that was OK.
Now it happens that this 'new' NEMS has no access to one of my machines because it has an IP address that is not the correct one for access... So there are about 9 services that give a warning at the moment:
As far as I can see, everything is enabled, but no telegrams are being sent (mails are) even though Nagios tells me that the script is being executed...
I have added some code to the telegram_nems.lua script to write some data to a log file, but nothing gets written to that...
Posts: 1,047
Threads: 42
Joined: Mar 2012
Reputation:
25
Can you please send me your support.nems file to review?
PS - the Telegram notification script has been rewritten for NEMS 1.5 coming next month - so it's not a long wait to get the upgraded version (which is greatly improved).
Cheers,
Robbie
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Posts: 1,047
Threads: 42
Joined: Mar 2012
Reputation:
25
Thanks for sending the file. However, this file appears to be from NEMS 1.3 (not supported).
Can you get by with email notifications for now and migrate to NEMS 1.5 next month?
Let me know.
Robbie
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Posts: 1,047
Threads: 42
Joined: Mar 2012
Reputation:
25
Yes, me too. Granted NEMS 1.3 isn't supported any longer (hasn't been for a while) but I'd like to make sure you're up and going having migrated to 1.4.1.
Will review the new file asap - thanks.
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Posts: 1,047
Threads: 42
Joined: Mar 2012
Reputation:
25
Hi baggins.
Sure enough, having added telegram support to your old NEMS 1.3 server, this made your backup contain your modified check commands rather than the ones powered by NEMS SST.
Why it stopped working? I don't know. 1.3 is so old, it could be anything.
The issue is this: your backup, containing your customized version of the misccommands, automatically override the default commands. This is on purpose: if a user modifies their check commands, upon importing their backup they will receive their modified version, not the system's default version (for obvious reasons - don't want them having to redo all the work they've done).
So in your case, because your custom misccommands for telegram do not use the same settings as NEMS 1.4.1, it basically made your notifications incompatible.
I've emailed you a modified version of your backup.nems from NEMS 1.3, which you conveniently accidentally sent me. This modified version corrects your custom commands to use the telegram notifiers combined with NEMS SST. Importing this to your NEMS 1.4.1 server should work... untested. :)
Heads up too that in NEMS 1.5 you'll no longer need to add 'bot' to your api key. For now, it remains (in NEMS 1.4.1).
Let me know how it goes, and if it's outstanding, please consider throwing something into the tip jar if you can :P
Cheers,
Robbie
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Posts: 49
Threads: 8
Joined: Oct 2017
Reputation:
5
Hi Robbie,
I'm not quite sure I understand your explanation but I will study this further...
I did a restore with your backup but alas: no telegrams.
The debug statements I added to /usr/local/bin/telegram_nems.lua are still there but I see no entries in the log it should write to...
Thanks
Posts: 1,047
Threads: 42
Joined: Mar 2012
Reputation:
25
Please re-flash to revert your NEMS 1.4.1 to stock, then import the backup.nems file I sent you.
Summary:
- NEMS has default config, which is tested and works.
- User imports their own config, this *overwrites* the default config, assuming the user made changes that they desire.
- The default config contains the correct NEMS SST variables for telegram. Your backup (from NEMS 1.3) does not.
- Importing your backup from NEMS 1.3 overwrites the working defaults with the not working custom commands.
- The backup.nems I sent you has your backup, but with the fixed commands for telegram.
Lemme know. If it still doesn't work, please send me a new support.nems file so I can see where it got to in the migration from 1.3.
Cheers!
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks: