IO Logs

Retrieves an I/O log file. Output can be limited by len and start parameters so that individual parts of the log can be retrieved in chunked form.

GET https://pbuild:24351/REST/iolog?appid=<appid>&timestamp=<timestamp>
&hmac=<hmac>&file=%2Ftmp%2Fiolog.root.ckYxun
RESPONSE {"bytes":5832,"start":-1,"status":0,"file":"/tmp/iolog.root.ckYxun","len":0,"log":[{"time":1386255179},
{"cols":80,"cmd":"CMD_WINCH","rows":24},{"time":1386255179},
{"blob":"G10wO2N0YXlsb3JAcGJ1aWxkOi9ob21lL2N0YXlsb3IHG1s/MTAzNGhbcm9vdEBwYnVpbGQgY3RheWxvcl0jI
A==","cmd":"stdout","blen":64},{"time":1386255180},{"blob":"bA==","cmd":"stdin","blen":1},
{"time":1386255180},{"blob":"bA==","cmd":"stdout","blen":1},{"time":1386255180},
{"blob":"cw==","cmd":"stdin","blen":1},{"time":1386255180},{"blob":"cw==","cmd":"stdout","blen":1},
{"time":1386255181},{"blob":"DQ==","cmd":"stdin","blen":1},{"time":1386255181},
{"blob":"DQo=","cmd":"stdout","blen":2},{"time":1386255181}, ...

List all the files in a given directory (without checking if they are I/O logs). Filter can be specified as a regular expression to filter output. Some system directories cannot be listed for security.

GET https://pbuild:24351/REST/iolog?appid=<appid>&timestamp=<timestamp>&hmac=<hmac>&path=%2Ftmp
RESPONSE {"dir":
[{"name":"iolog.root.XXXXXX","mtime":1386252738,"path":"/tmp/iolog.root.XXXXXX","size":4928},{"name":".8.0.0-
04.debug.60505","mtime":1386332287,"path":"/tmp/.8.0.0-04.debug.60505","size":850},
{"name":"pbcheck.log","mtime":1386076851,"path":"/tmp/pbcheck.log","size":94},
{"name":"iolog.root.jVruz1","mtime":1386255133,"path":"/tmp/iolog.root.jVruz1","size":5032},{"name":".8.0.0-
04.debug.42263","mtime":1386335007,"path":"/tmp/.8.0.0-04.debug.42263","size":46},{"name":".8.0.0-
04.debug.42219","mtime":1386334929,"path":"/tmp/.8.0.0-04.debug.42219","size":835},
{"name":"iolog.root.0HEKM5","mtime":1386256245,"path":"/tmp/iolog.root.0HEKM5","size":4979}, ...

Retrieves the log variables from the specified I/O log.

GET https://pbuild:24351/REST/iolog/variables?appid=<appid>&timestamp=<timestamp>
&hmac=<hmac>&file=%2Ftmp%2Fiolog.root.ckYxun
RESPONSE {"status":0,"log":{"umask":18,"masterlocale":"en_US","nice":0,"rungroup":"root","eventlog":"/var/log/800pb.eventlog","loghostip":"192.168.16.138","masterhostip":"192.168.16.138","rlimit_fsize":-	1,"pbmasterdsysname":"Linux","optopt":"","time":"14:52:58","submithost":"pbuild","event":"Accept","pblogdversion":"#1 SMP Wed Oct 16 18:37:12 UTC 2013","false":0,"runrlimit_core":0,"year":2013,"groups":
	[],"pbversion":"8.0.0-06","pbmasterdversion":"#1 SMP Wed Oct 16 18:37:12 UTC
	2013","host":"pbuild","optind":1,"pbmasterdnodename":"pbuild","rlimit_cpu":-1,"logservers":[],"runrlimit_	memlock":65536,"runbkgd":0,"rcsworkgroup":"tramboyoPBULMasterBeyondTrustWorkgroup","rungroups":[],"logserverlocale":"en_US","runeffectiveuser":"root","pbrunmachine":"x86_64","runtimeout":0,"month":12,"dayname":"Thu","pbrunnodename":"pbuild","runoptimizedrunmode":1,"iolog":"/tmp/iolog.root.XXXXXX","submitlocale":"en_GB.UTF-8","runrlimit_
	nofile":1024,"optarg":"","cwd":"/home/ctaylor","runrlimit_cpu":-1,"date":"2013/12/05", ...
GET https://pbuild:24351/REST/iologfile?appid=<appid>&timestamp=<timestamp>
&hmac=<hmac>&file=%2Ftmp%2Fiolog.root <binary attachment>

Search a list of logs, specified with a glob style wildcard parameter file, for the query string <query>. This is a similar format to the SOLR search string where you have a regular expression query, with keyword:value values. For example stdout:.*inittab searches for any I/O logs that incorporate the word inittab in the output. All of the standard keyword values that can be extracted from I/O logs can be used in the search criteria. Regular expression matches are not made across newlines.

GET https://pbuild/REST/iolog/search?appid=<appid>&timestamp=<timestamp>
&hmac=<hmac>&file=%2ftmp%2fiolog%2a&query=stdout%3a%2e%2apbrest%2e
RESPONSE {"iologs":["/tmp/iolog.root.LNRRnt","/tmp/iolog.root.XXXXXX"],"status":0}

Retrieves and interprets an I/O log file ready to be output by a GUI. Terminal emulation can be overidden using the parameter term, and the output can be limited by len and start parameters so that individual parts of the log can be retrieved in chunked form.

GET https://pbuild:24351/REST/iolog/replay?appid=<appid>&timestamp=<timestamp>
&hmac=<hmac>&file=%2Ftmp%2Fiolog.root.ckYxun
RESPONSE {"status":0,"file":"/tmp/iolog-root.HxV7YJ","term":"xterm","start":-1,"len":0,"bytes":10676,"log":
[{"type":"token","name":"sz","values":[44,125]},{"type":"text","time":1398357936,"value":"[root@pbuild tmp]# "},
{"type":"text","time":1398357937,"value":"l"},{"type":"text","time":1398357937,"value":"s"},
{"type":"token","name":"absx","values":[0]},{"type":"token","name":"nel"},
{"type":"text","time":1398357937,"value":"beyondtrust_pbinstall"},{"type":"token","name":"htab","values":[1]},
{"type":"token","name":"htab","values":[1]},{"type":"token","name":"htab","values":[1]},
{"type":"token","name":"htab","values":[1]},{"type":"text","time":1398357937,"value":" img2c.8.5.0-01.debug.31350 img2c.8.5.0-01.debug.31548"},{"type":"token","name":"absx","values":[0]},
{"type":"token","name":"nel"},{"type":"text","time":1398357937,"value":"beyondtrust_Solrinstall.prompt_log"},
{"type":"token","name":"htab","values":[1]},{"type":"token","name":"htab","values":[1]},
{"type":"text","time":1398357937,"value":" img2c.8.5.0-01.debug.31359 img2c.8.5.0-01.debug.31557"},
{"type":"token","name":"absx","values":[0]},{"type":"token","name":"nel"},
{"type":"text","time":1398357937,"value":"beyondtrust_Solrinstall.prompt_log.ctime.Dec_5_14:15 img2c.8.5.0-01.debug.31368 iolog-root.HxV7YJ"},{"type":"token","name":"absx","values":[0]},{"type":"token","name":"nel"},
{"type":"text","time":1398357937,"value":"beyondtrust_Solrinstall.prompt_log.ctime.Dec_5_14:16 img2c.8.5.0-01.debug.31377 keyring-4E6Ccd"},{"type":"token","name":"absx","values":[0]},{"type":"token","name":"nel"},
{"type":"text","time":1398357937,"value":"beyondtrust_Solrinstall.prompt_log.ctime.Dec_5_14:18 img2c.8.5.0-01.debug.31386 keyring-IAzgb5"},{"type":"token","name":"absx","values":[0]},{"type":"token","name":"nel"},
{"type":"text","time":1398357937,"value":"beyondtrust_Solrinstall.prompt_log.ctime.Dec_5_14:21 img2c.8.5.0-01.debug.31395 keyring-qafDnO"},{"type":"token","name":"absx","values":[0]},{"type":"token","name":"nel"},
{"type":"text","time":1398357937,"value":"gedit.ctaylor.233387052"},{"type":"token","name":"htab","values":[1]},
{"type":"token","name":"htab","values":[1]},{"type":"token","name":"htab","values":[1]},
{"type":"token","name":"htab","values":[1]},{"type":"text","time":1398357937,"value":" img2c.8.5.0-01.debug.31404 keyring-sQMK20"},{"type":"token","name":"absx","values":[0]},{"type":"token","name":"nel"},
{"type":"text","time":1398357937,"value":"gedit.root.2441861592"},{"type":"token","name":"htab","values":[1]},
{"type":"token","name":"htab","values":[1]},{"type":"token","name":"htab","values":[1]}, ...

I/O Log Cached List

If you chose to install the Log Cache database for use with PowerBroker Server Management Console, the log host creates and maintains a database to cache the names, locations, and other pertinent information about I/O logs. You can retrieve the list of cached I/O log information using the following calls. Options are provided to filter and sort the output based on certain criteria. Output can also be limited by len and start parameters so that individual parts of the log can be retrieved in chunked form.

GET https://pbuild/REST/iolog/list?appid=<appid>&timestamp=<timestamp>&hmac=<hmac>
RESPONSE {"result":[{"uniqueid":"ac14202058221f4b116C","partnum":1,"createtime":1478631243787,"loghost":"uni.symark.com","logpath":"/var/log/pbiolog_SEPI7FJ5b","submithost":"uni.symark.com","submituser":"root","runhost":"uni.symark.com","runuser":"root","runcmd":"rm"},{"uniqueid":"ac14202058221fb9118E","partnum":1,"createtime":1478631354266,"loghost":"uni.symark.com","logpath":"/var/log/pbiolog_SEPWd7Drt","submithost":"uni.symark.com","submituser":"root","runhost":"uni.symark.com","runuser":"root","runcmd":"passwd"}]}

Filters

To retrieve the cached I/O log list filtered by the log path name, use the REST GET HTTP method with a URL similar to https://…/list?path, specifying a glob wildcard.

https://pbuild/REST/iolog/list?appid=<appid>&timestamp=<timestamp>&hmac=<hmac>&path=%2fvar%2flog%2f%2apb%5fiolog%2a

To retrieve the cached list of I/O log containing events on or after the given date/time, use the REST GET HTTP method with a URL similar to https://…/list?from, specifying date/time in the yyyy-mm-dd HH:MM format.

https://pbuild/REST/iolog/list?appid=<appid>&timestamp=<timestamp>&hmac=<hmac>&from=2016%2d11%2d02+18%3a00

To retrieve the cached list of I/O log containing events on or before the given date/time, use the REST GET HTTP method with a URL similar to https://…/list?to, specifying date/time in the yyyy-mm-dd HH:MM format.

https://pbuild/REST/iolog/list?appid=<appid>&timestamp=<timestamp>&hmac=<hmac>&to=2016%2d11%2d02+18%3a00

To retrieve the cached I/O log list filtered by runhost, use the REST GET HTTP method with a URL similar to https://…/list?runhost, specifying a runhost.

https://pbuild/REST/iolog/list?appid=<appid>&timestamp=<timestamp>&hmac=<hmac>&runhost=uni%2esymark%2ecom

To retrieve the cached I/O log list filtered by submithost, use the REST GET HTTP method with a URL similar to https://…/list?submithost, specifying a submithost.

https://pbuild/REST/iolog/list?appid=<appid>&timestamp=<timestamp>&hmac=<hmac>&submithost=uni%2esymark%2ecom

To retrieve the cached IO log list filtered by submituser, use the REST GET HTTP method with a URL similar to https://…/list?submituser, specifying a submituser.

https://pbuild/REST/iolog/list?appid=<appid>&timestamp=<timestamp>&hmac=<hmac>&submituser=root

To retrieve the cached I/O log list filtered by runuser, use the REST GET HTTP method with a URL similar to https://…/list?runuser, specifying a runuser.

https://pbuild/REST/iolog/list?appid=<appid>&timestamp=<timestamp>&hmac=<hmac>&runuser=root

To retrieve the cached I/O log list filtered by runcommand, use the REST GET HTTP method with a URL similar to https://…/list?runcmd, specifying a runcommand.

https://pbuild/REST/iolog/list?appid=<appid>&timestamp=<timestamp>&hmac=<hmac>&runcmd=rm

To retrieve the cached I/O log list limited by an offset and number of records, use the REST GET HTTP method with a URL similar to https://…/list?path, specifying start and/or len parameters.

https://pbuild/REST/iolog/list?appid=<appid>&timestamp=<timestamp>&hmac=<hmac>&start=10&len=5