Jan 15, 2017

Sujesh Ramachandran

Event Monitoring in Salesforce


Salesforce Provides detailed info about the user activty and you could use the details to Monitor data loss, Increase adoption, Optimize performance and bulid powerful tools to either visualize the details or any automated service for User tracking etc. Event monitoring is one of many tools that Salesforce provides to help keep your data secure. It lets you see the granular details of user activity in your organization. These user activities are referred as events. You can view information about individual events or track trends in events to swiftly identify abnormal behavior and safeguard your company’s data.

Event monitoring provides tracking for more than 30 different types of events, including:
  • Apex Callout
  • Apex Execution
  • Apex SOAP
  • Apex Trigger
  • API
  • Async Report
  • Bulk API
  • Change Set Operation
  • Content Distribution
  • Content Document Link
  • Content Transfer
  • Dashboard
  • Document Attachment Downloads
  • Login
  • Login As
  • Logout
  • MDAPI Operation
  • Multiblock Report
  • Package Install
  • Queued Execution
  • Report
  • Report Export
  • REST API
  • Salesforce1 Adoption (UI Tracking)
  • Sandbox
  • Sites
  • Time-Based Workflow
  • Transaction Security
  • UI Tracking
  • URI
  • Visualforce Request
  • Wave Change
  • Wave Interaction
  • Wave Performance

All these events are stored in event log files. An event log file is generated when an event occurs in your organization and is available to view and download after 24 hours. The event types you can access and how long the files remain available depends on your edition.

  • Developer Edition (DE) organizations have free access to all 30+ log types with one-day data retention.
  • Enterprise, Unlimited, and Performance Edition organizations have free access to the login and logout log files with one-day data retention. For an extra cost, you can access all log file types with 30-day data retention.

Considerations while using Event Monitoring:
  • LogDate tracks usage activity for a 24-hour period, from 12:00 a.m. to 11:59 p.m. UTC time.
  • Log files are available based on CreatedDate for the last 30 days when orgs purchase User Event Monitoring or one day for Developer Edition orgs.
  • In the unlikely case where no log files are generated for 24 hours, contact Salesforce.
  • Log data is read-only. You can’t insert, update, or delete log data.
  • Use the EventType field to determine which files were generated for your org.
  • An event generates log data in real time. However, log files are generated the day after an event takes place, during nonpeak hours. Therefore, log file data is unavailable for at least one day after an event.
  • CreatedDate tracks when the log file was generated.
  • Log files, represented by the EventType field, are generated only if there is at least one event of that type for the day. If no events took place, the file isn’t generated for that day.
  • All event monitoring logs are exposed to the API through the EventLogFile object, however there is no access through the user interface.

Event monitoring Using REST

Use the SObject Describe resource to retrieve all metadata for an object, including information about fields, URLs, and child relationships.

Query Event Monitoring Data with REST
Use the Query resource to retrieve field values from a record. Specify the fields you want to retrieve in the fields parameter and use the GET method of the resource. You can use Workbench to query event monitoring data. To retrieve event monitoring records based on LogDate and EventType

Get Event Monitoring Content from a Record
Use the SObject Blob Retrieve resource to retrieve BLOB data for a given record. You can use Workbench to retrieve BLOB data for event monitoring. In the Execute text box, use a GET request similar to this: /services/data/v32.0/sobjects/EventLogFile/0ATD000000000pyOAA/LogFile.

Download Large Event Log Files Using cURL with REST
You might have some event log files that are larger than your tool can handle. A command line tool such as cURL is one method to download files larger than 100 MB using the SObject Blob Retrieve object.
curl https://***yourInstance***.salesforce.com/services/data/v32.0/sobjects/EventLogFile/0AT30000000000uGAA/LogFile
-H "Authorization: Bearer token" -H "X-PrettyPrint:1" -o ~/downloads/outputLogFile.csv

For more details, check the Trail Head Module

follow me @ramsujesh

Sujesh Ramachandran

About Sujesh Ramachandran -

Co-Founder @ Fingertipplus Technologies | Co-Organizer of Coimbatore Salesforce Developer Group | Full Stack Coder | Blogger

Subscribe to this Blog via Email :

26 comments

Write comments
Unknown
AUTHOR
July 28, 2017 10:36 PM delete

The blog gave me idea about the event monitoring in salesforce My sincere thanks for sharing this post
Salesforce Training in Chennai

Reply
avatar
abril joseph
AUTHOR
August 18, 2017 9:55 PM delete

Truely a very good article on how to handle the future technology. This content creates a new hope and inspiration within me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks :).. We are offers a authorized exam Center in bangalore. Pearson Vue Exam Center in Bangalore |
Pearson Vue Exam Centers in Bangalore |

Reply
avatar
Doorstephub
AUTHOR
May 17, 2018 1:42 AM delete

Aw, this was a very nice post. In thought I wish to put in writing like this moreover – taking time and precise effort to make a very good article… Salesforce Training in Hyderabad however what can I say… I procrastinate alot and by no means seem to get something done.

Reply
avatar
Madhu Balan
AUTHOR
August 26, 2019 7:56 AM delete

Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well. It was crystal clear, keep sharing..
Java Training in Chennai
Java Training in Coimbatore
Java Training in Bangalore

Reply
avatar
Aruna
AUTHOR
May 20, 2020 9:41 AM delete

This is one of the Nice Resource to Share the Good Stuffs to others...Keep sharing an Excellent information's with us...
Java training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery

Reply
avatar
Jayalakshmi
AUTHOR
August 02, 2020 8:53 AM delete

Very nice post here and thanks for latest smartphone applications it .I always like and such a super colors of phone for these post.Excellent and very cool idea and great models and different kinds of the more information's.
java training in chennai

java training in tambaram

aws training in chennai

aws training in tambaram

python training in chennai

python training in tambaram

selenium training in chennai

selenium training in tambaram

Reply
avatar
jeni
AUTHOR
August 11, 2020 12:31 AM delete

Irrespective of rankings, this will help in huge traffic generation, on your website, over time and, in turn,will steadily increase the number of potential customers for your products and services.

hardware and networking training in chennai

hardware and networking training in velachery

xamarin training in chennai

xamarin training in velachery

ios training in chennai

ios training in velachery

iot training in chennai

iot training in velachery

Reply
avatar
Mohd Sharique
AUTHOR
October 23, 2020 12:31 PM delete

Excellent blog!!! I got to know more useful information by reading your blog. Thanks for posting this blog.

Python Training In Pune
python training institute in pune

Reply
avatar
Technogeekscs
AUTHOR
December 19, 2020 3:04 AM delete

This information is really awesome thanks for sharing most valuable information.
Data Science
Selenium
ETL Testing
AWS
Python Online Classes

Reply
avatar
jegan
AUTHOR
January 12, 2021 9:54 AM delete

wonderful article contains lot of valuable information. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.
This article resolved my all queries.good luck an best wishes to the team members.continue posting.learn digital marketing use these following link
Digital Marketing Course in Chennai

Reply
avatar
January 27, 2021 11:06 PM delete

That's really impressive and helpful information you have given, very valuable content.
We are also into education and you also can take advantage really awesome job oriented courses

Reply
avatar
yadongbiz
AUTHOR
September 14, 2021 6:28 AM delete

I blog often and I truly appreciate your content.
야설

Feel free to visit my blog :
야설

Reply
avatar
yadongbiz
AUTHOR
September 14, 2021 6:29 AM delete

This great article has truly peaked my interest.
일본야동
Feel free to visit my blog : 일본야동

Reply
avatar
yadongbiz
AUTHOR
September 14, 2021 6:30 AM delete

I’m going to bookmark your site and keep checking for new details about once per week.
국산야동
Feel free to visit my blog : 국산야동

Reply
avatar
yadongbiz
AUTHOR
September 14, 2021 6:30 AM delete

I subscribed to your Feed too.
일본야동
Feel free to visit my blog : 일본야동

Reply
avatar
yadongbiz
AUTHOR
September 14, 2021 6:31 AM delete

Hi there! This article could not be written much better!
야설
Feel free to visit my blog : 야설

Reply
avatar