Closed kevinmcox closed 4 years ago
Thanks for this. I am not actually able to reproduce it. Are you able to reproduce this on a fresh vm, or a system with a fresh install?
I can reproduce this on a 10.14.6 (fully patched) VM, with a fresh install of Munki 4.0.1.3899, Autopkg 2.0.2, Git 2.2.1 and Autopkgr 1.5.2.
Autopkgr can successfully send a test message to Slack and also send test template messages, but no notifications are sent during an autopkg run (irrespective of whether I have all items individually checked or if they're all un-checked and 'Any action' is selected).
I see the same behaviour on our prod Munki/Autopkg(r) box. Please let me know if you need anything further!
Thank you. If you select Selected Actions > New software imported to Munki, JSS, or other server, do you notice any Slack-related errors in the log when you run a recipe?
No, not that I can see under the autpkgr process (comparing log entries from a test message and an AutoPkgr run).
Attached are the output from a 'send test' under Slack notification configuration screen (SlackTest.txt) and a sample AutoPkgr run to fetch Chrome (AutoPkgr_run.txt). Verbose logging is turned on for both of these.
Hope this is useful!
` SlackTest.txt AutoPkgr_run.txt
`
@kevinmcox @mikethehill was this working before December? Is that when it started?
Unable to say re: working before December as I've only recently looked at AutoPkgr (starting with 1.5.1). Just tested this with AutoPkgr 1.5 (running autopkg 1.4.1) and I get the same result - test notifications are successfully sent, along with message template test message, but nothing after an AutoPkg run.
@mikethehill, thanks so much for jumping in here while I was away and confirming the issue.
@shawnhonsberger, I can't say when it started. I only noticed because I was setting up a new Autopkg computer and was setting everything back up from scratch.
I was able to confirm it on both my old (physical server) and new setup (VM) if I manipulated the settings as shown in the screenshots above.
@kevinmcox Do Slack notifications work if you enable email alerts? I enabled email alerts, left Slack alerts enabled, ran recipes and received both an email alert and Slack!
Yep, if I turn on email notifications it fixes the specific issue with the checkbox.
@kevinmcox I have been testing this with AutoPkgr 1.5.3 with, and without email notifications enabled and I am able to get Slack Notifications. Here is a picture of my settings that work for me. Is this still an issue for you?
@shawnhonsberger I had just left emails on. I'll switch the settings around and test again with 1.5.3.
Thanks, @kevinmcox!
@shawnhonsberger Unfortunately I'm seeing the same behavior. I just spent an hour testing all the variations and there is no change from my original post.
With the settings in your last screenshot I get the Slack notification, but only related to the download, not the import into Munki (like my very first screenshot at the top). Enabling email alerts sends both parts of the notification to Slack.
@kevinmcox Thanks for confirming. Though I am unable to reproduce it, it doesn't mean I don't want to chase this down. If you are fine leaving email notifications on, then we'll leave it be.
No worries Shawn. I don't even need to leave email notifications on, as long as I have things set like this it works:
https://user-images.githubusercontent.com/25358601/70824658-45253900-1da8-11ea-9435-8bbf5dc28e50.png
Thank you, @kevinmcox. I'll close this for now. In the meantime, I'll keep watching for it and I'll also take a look at the button next chance I get.
@shawnhonsberger FYI, I see similar behaviors. I don't think opening a new issue makes sense, so I will write my report here.
The persistence of the notifications settings seem to be a tad inconsistent across the board. On my clean install on Catalina, I experience the following:
Slack and macOS notifications don't fire if email notifications are disabled.
The moment I turn email notifications back on, the others start working again. I cannot troubleshoot any further because the log isn't verbose enough to do so.
Note: I enabled Verbose logs
and Verbose AutoPkg run
.
Notification trigger rules are not overridden by the Any action
. E.g.:
Selected actions
, and remove New software is downloaded
.Any action
and close.One would expect to be notified about new downloads, but it doesn't seem to be the case. It looks like the Any action
selection is not being registered. Restarting AutoPkgr doesn't seem to solve the problem.
Cheers!
It appears that Slack notifications will not be sent when software is imported into Munki if the option "New software imported to Munki, JSS, or other server" is selected at all. (This does not effect other notifications sent at the same time such as downloads, errors, etc. Examples below showing one Slack message with the import notification and another without. )
This includes when the selected preference is "Any action" but the specific box remains checked (but greyed out) below:
It also includes when the selected preference is "Selected actions" and includes the "New software imported to Munki, JSS, or other server" option:
If "Any action" is selected and the "New software imported to Munki, JSS, or other server" option is not checked then the import notification is sent:
I haven't noticed any of the other notification options being similarly effected, but haven't tested for them either. Please let me know if you have any questions or need additional clarifications.