Posted on 05-07-2019 01:34 AM
I want users to be moved to a smart group if they press a button on self-service.
For example, a user presses a "HELP!" button, they are immediately moved to a smart group and I get informed about it.
Posted on 05-07-2019 02:33 AM
Your ‘HELP!’ button could install a basic package that drops a receipt file somewhere (/etc/). Create an extension attribute that looks for the file and have the ‘HELP!’ policy run an immediate recon after it runs.
The smart group would be based on the presence of the receipt file.
If you use Slack you can create a webhook that will post an SOS alert to a private channel alerting you that a user clicked the button.
Posted on 05-07-2019 02:50 AM
Interesting!
I'll look into it.
Thanks!
Posted on 05-07-2019 04:22 AM
Now I'm at a blocker.
The file created, the computer was added to the smart group.
I was informed and handled it.
I want the computer out of the smart group. In other words, the file must get deleted.
Is it possible to put a timer on the file?
I used this script
#!/bin/sh
if [ -e /sbin/filename ]
then
echo "<result>True</result>"
else
echo "<result>False</result>"
fi
What should I add, if I want it to delete the file after 30 minutes?
Posted on 05-07-2019 05:43 AM
There are a number of ways to do this, but perhaps the simplest would be to have the script that lays down the receipt file have a timer that deletes it after 30 minutes. Just be sure to run recon after the file is put in place and again after it is deleted so that the EA is updated and the smart group membership recalculated.
Posted on 05-07-2019 05:53 AM
How does the timer know that you handled the case? Wouldn't it be safer if you triggered the removal of the file, once you handled the issue? You could write a policy that does the removal, add the smart group mentioned above as a 'Limitation', add the device in question to the 'Scope' once you handled the case, and also have the policy run a recon after the file removal.
Posted on 05-07-2019 10:05 AM
Is the smart group doing anything else other than triggering an email alert?
There are more efficient ways of sending notifications from users via self service.