Overview
This document outlines the steps that Jive Hosted/On-Premise customers can take to make use of Jive's document and page view logging tools.
Customers can retrieve the following information when someone accessed a document, usually for security purposes:
- Username
- Time of access
- IP address
Note:
This is not a process that Central Support will provide full assistance on, nor will Jive agents be responsible for fixing/addressing related issues for this particular report as this falls outside the scope of support.
Environment
Jive Interactive Intranet-Jive Core, Jive Hosted/On-Premise
Process
- It is strongly recommended that these scripts are not run on a production server. If necessary, copy/move the following logs:
jive-httpd-access.log(s)
jive-httpd-ssl-access.log(s)
So they can be analyzed off the production webserver. They must be in its own empty directory. The following requirements need to be met for the scripts to execute properly:- Required apache log format for log parsing:
"LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D %k \"%{Referer}i\" \"%{User-Agent}i\" \"%{Content-Type}o\" %{JSESSIONID}C %F" common
- Note: The x-forwarded-for header is needed for on-premise sites with load balancing or proxying in order to capture the original requesting IP. The script will still execute without its inclusion. However, any reports tracking IPs will be of little value without the original request IP's record in the httpd logs.
- Required log file name: Log file names must include
"jive-httpd-"
in the file name. - Required log rotation: Daily log rotation for monthly PV reporting option. (*Note, PV results may be inaccurate if logs are not rotated accordingly. )
- Required python interpreter: For non-jive-production systems, please create a symbolic link to python at
/usr/local/jive/python/bin/python
such as:sudo mkdir -p /usr/local/jive/python/bin/ sudo ln -s /usr/local/jive/python/bin/python
- Required math library: bc - A standard math library available by command line option. (Installed by default with most Linux/Unix systems. Please verify, as script calls bc for mathematical precision calculation. Available through yum/apt-get and most distro repos.
- Required apache log format for log parsing:
- Copy the 4 scripts/files provided by Jive into the same folder location and unzip them. Also, ensure that the system has access/permissions to the logs to be analyzed if it is not stored locally.
loginfo.sh
- Shell script used to specify dates and type of log analysis report to produceparser.py
- Python script called by loginfo.sh that parses apache log files based on values passed from loginfo.shbots
- Plain text file containing name's for known bots. Used by parser.py to categorize those log entries as "botviews".hosts
- Plain text file containing IP's of known hosts. Used by parser.py to blacklist hosts from the log analysis report.
- Ensure the loginfo.sh script is executable.
chmod +x loginfo.sh
- Execute the loginfo.sh script on the server logs to be analyzed.
- It can be used for a single day or for the full month.
- It can handle multiple *jive-httpd* log files (for handling rotated logs and/or central httpd log repository for multiple webservers) in both compressed (.gz only) and uncompressed formats.
- To specify the logs location, use the -l "<location>" option as shown below. (If no path is specified, the script looks for *jive-httpd-* files in
/usr/local/jive/var/logs/
) - The script first searches for which log files contain relevant dates to report on and then parses each log entry. Script run time performance will be affected by the number of logs and log sizes being analyzed.
Usage: loginfo.sh [OPTION]...
Example: ./loginfo.sh -d 5/15/2014 -p apiviews -t topagents
Options include:
-l <location> For on-prem Customers. Specify the path of the log files to be analyzed.
-d <MM/DD/YYYY> Specify date. If you do not specify a date it will assume you want the logs from yesterday.
-m Analyze the full month, not just the specific day.
-p <logtype> Specify parser script log type. Valid options include userviews, apiviews, botviews, mobilegatewayviews, mobilebrowserviews.
-t <outputtype> Specify the output type. Valid options include toppages, topips, topresponses, topsessions, topagents, topreferrers.
-o <lines> Specify the number of lines you want in the output. Default is 25.
-u Enable analysis on a specific url page. Copy address and put in " ".
-f <logfile> Enable logging and specify the file to write to.
-w Enable new APIview whitelisting feature. For testing.
Note:
The username and time of access is available through Data Export Service Analytics (DES). For cloud versions, the httpd logs also have the IP address information.
Comments
0 comments
Article is closed for comments.