Log Files
TigerGraph Database captures key information on activities occurring across its different components through log functions that output to log files. These log files are not only helpful in troubleshooting but also serve as an auditory resource. This document gives a high-level overview of TigerGraph's logging structure and lists some common information one might need to monitor their database services and where to obtain them in the logs.
Overall Logging Structure
Logs in TigerGraph are stored at <tigergraph_root_dir>/log/
. TigerGraph's logs are divided into different folders by the different internal components and each folder corresponds to a different component. Log formats also vary across the different components. In folders where logs are checked often, such as restpp
, gsql
, and admin
, there are three symbolic links that help you quickly get to the most recent log file of that category:
log.INFO
Contains regular output and errors
log.ERROR
Contains errors only
<component_name>.out
Contains all output from the component process
log.WARNING
orlog.DEBUG
log.WARNING
contains warningsIn the
gsql
folder,log.DEBUG
contains very specific information you only need when certain errors happen
Knowing where certain activities are recorded allows one to use tools such as the Linux grep
command to easily obtain critical information from your database.
Log locations on a cluster
In a TigerGraph cluster, each node will only keep logs of activities that took place on the node itself. For example, the GSQL logs on the m1 node will only record events for m1 and are not replicated across the cluster.
For GSQL specifically, the cluster will elect a leader to which all GSQL requests will be forwarded. To check which node is the leader, start by checking the GSQL logs of the m1 node. Check the most recent lines of log.INFO
and look for lines containing information about leader switch. For example, the logs below recorded a GSQL leader switch from m2 to m1:
Monitor request history
All requests made to TigerGraph's REST endpoints are recorded by the RESTPP logs and Nginx logs. Information available in the logs includes:
Timestamp of the request
API request parameters
Request Status
User information (when RESTPP authentication is turned on)
RESTPP is responsible for many tasks in the TigerGraph internal architecture and records many internal API calls, which can be hard to distinguish from manual requests. When RESTPP authentication is on, the RESTPP log will record the user information and mark a call if it is made by an internal API. Therefore, you can use the command below to filter for manual requests:
RequestInfo
contains the ID of the request, which you can use to look up more information on the request :
Here is an example of using a request ID to look up a request in the restpp log:
Monitor user management tasks
User management activities, such as logins, role and privilege changes are recorded in the GSQL logs in the folder gsql
.
To view recent activities, use the symlink log.INFO
. There is a lot of information in the logs - to filter for information that you need, you can use Linux commands such as grep
and tail
For example, to view recent changes in roles, you can run the following command in the gsql
log directory:
To view login activities, search log.INFO
for "login"
instead.
Last updated