Jump to content


How to get notification if some files are marked for delete?

Marked for Delete Alert

  • Please log in to reply
2 replies to this topic

#1 SANJAY

SANJAY

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 10 April 2019 - 02:43 PM

Hi All,

I am looking for some solution when some body will mark any file for delete in my work space or project folder then Perforce should send an alert message to defined person or group of people.

Is it possible in Perforce?

Thanks in Advance,
Sanjay

#2 p4rfong

p4rfong

    Advanced Member

  • Staff Moderators
  • 330 posts

Posted 19 April 2019 - 09:43 PM

You can write a command trigger where a script runs every time "p4 delete" is run.  The script would send an email (such as the Unix mail or mailx command).  See https://www.perforce...gers.order.html

#3 Matt Janulewicz

Matt Janulewicz

    Advanced Member

  • Members
  • PipPipPip
  • 172 posts
  • LocationSan Francisco, CA

Posted 08 May 2019 - 07:26 AM

If you have an aversion to triggers, or have what you might consider too many triggers already (like I do), you could also perhaps just parse the server log(s) for 'user-delete'.

Better yet, enable the 'command' structured log because those are crazy-easy to parse.

If I wanted to do this where I work, we already ingest the command logs into Splunk so it would be easy to alert on that command.

I also routinely use our monitoring system (Zabbix) for tailing/grepping logs and sending alerts.

A trigger might be more versatile, though, if you're wanting to send alerts to different people when different paths have a delete action performed against them.
-Matt Janulewicz
Staff SCM Engineer, Perforce Administrator
Dolby Laboratories, Inc.
1275 Market St.
San Francisco, CA 94103, USA
majanu@dolby.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users