Jump to content
gatordile

When a specific PC turns on

Recommended Posts

I need to know exactly when specific PCs get turned on. I have maintenance I want to perform on them, but they aren't always in use and getting the user to turn them on for me isn't going to work. What's the best way to sense activity and alert myself?

Share this post


Link to post
Share on other sites

When you say maintenance, do you mean run scripts? If this is the case just schedule them to run on the agent using 'advanced settings' > unmark 'skip offline agents'.

If you mean that you want to know when a box switches on so you can connect to the screen, then you can write a one line script which sends a mail to your account with the text '%computername% has powered on'. Schedule that script to run using the above unmarked 'skip offline agents'.

You could get even more clever and write a generic script to be used by anyone and which sent a mail to the person who scheduled the script. Look at some of Darren Whites scripts. In fact his Send email script  does just this.

Also, is wake on lan not available?

Share this post


Link to post
Share on other sites

We use an Internal Monitor "Notify When Agent is Online" for this and assign based on EDF

Interval is every 5 minutes

Send Fail After Success

Table to Check: computers

Field to check: LastContact

Check Condition: LessThan

Result: date_add(now(),interval -30 minute)

On the Configuration: Identity Field:  computers.name,(SELECT `Value` FROM extrafielddata WHERE ExtraFieldID IN (SELECT ID FROM extrafield WHERE `Name`='Notify When Online' AND Form=1) AND ID=Computers.ComputerID) AS `Notify`

Additional Condition: Computers.ComputerID IN (SELECT ID FROM extrafielddata WHERE ExtraFieldID IN (SELECT ID FROM extrafield WHERE `Name`='Notify When Online' AND Form=1) AND Value LIKE '%_@_%')

 

Share this post


Link to post
Share on other sites

FWIW we use a monitor also but use a group, so we just add or remove the PC from the group.  We have a similar setup for "PC is idle" if we're waiting to work on a PC.

On 5/20/2020 at 11:41 AM, imurphy said:

unmark 'skip offline agents'.

That only works for the first few days then the script is removed.  It used to be 3 days, was intentionally cut down to a few hours by CW (a couple years ago), and has seemed to go back up to at least 24 hours.  Not sure what the timer is currently.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...