Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
31db13c
golang api stubs
araujof Mar 29, 2020
8969c45
added helper apis; fixed import
araujof Mar 29, 2020
62fe560
refactored go apis structure and bindings
araujof Mar 29, 2020
3e2cbec
adding go.mod
araujof Mar 29, 2020
7b6b88c
added opflag parsing utility to go apis
araujof Apr 12, 2020
6bbb2cb
Added support for flat records
Apr 15, 2020
e5659ec
Merge branch 'goapis' of github.com:/sysflow-telemetry/sf-apis into g…
Apr 15, 2020
a2878f8
Added init function to processor/handlers interface
Apr 17, 2020
daacc22
added zero types for flattener
araujof Apr 19, 2020
239d616
added shared cache to init interface
araujof Apr 20, 2020
57936fb
added openflags constants, added utility functions to go apis
araujof Apr 22, 2020
89baf17
added utilities for getting container type, and open flag checks in go
araujof Apr 22, 2020
9e3e864
fixed bug in provenance queries; process tree requires immutable wrap…
araujof Apr 23, 2020
49cf260
fixes attribute name typo when computing proc and pproc duration in p…
araujof Jun 1, 2020
4a71552
differentiate between op flags for NF and FF
araujof Jun 2, 2020
63f30ee
fixed open flags to represent sysdig's encoding
Jun 3, 2020
aafedbe
adding missing EXIT opflag to utility function in python apis
araujof Jun 10, 2020
d8d2b6d
Merge branch 'dev' of github.com:sysflow-telemetry/sf-apis into dev
araujof Jun 10, 2020
0021b6c
add None checks to support filtering when returning entities in reader
araujof Jun 15, 2020
a59f3a1
fixing openflags API after pairing openflags with sysdig internals
araujof Jun 18, 2020
5c6c9ae
processor interface refactoring
araujof Jun 30, 2020
7b952ae
Merge branch 'dev' into goapis
araujof Jun 30, 2020
65cd8d9
plugin package refactoring; adding registration interface and plugin …
araujof Jul 1, 2020
cfc1e66
refactored golang plugin api
araujof Jul 8, 2020
804b321
adds registration methods to golang plugin apis
araujof Jul 8, 2020
62ad860
added entry value to process object to signify whether the process is…
Jul 8, 2020
d6f81a0
adding GetName interface to processor interface
araujof Jul 9, 2020
17c35f9
added more features to the sf-api including support for the container…
Jul 16, 2020
0ae38e0
Updated changelog
araujof Jul 20, 2020
eaa5047
removed avsc_sysflow1001.hh file
Jul 20, 2020
0fd96de
added attributes to the avro schema and switched sysprint to work on …
Jul 21, 2020
c9e2e23
Merge branch 'proc-entrypoint' of github.com:sysflow-telemetry/sf-api…
araujof Jul 21, 2020
176da0c
fixed sfnb build warnings; fixed dependency issues; fixed minor bugs …
araujof Jul 21, 2020
759ce98
removing debug print statement
araujof Jul 22, 2020
3e43723
removed dependencies from avro and avro-gen, fixed matplotlib import …
araujof Jul 22, 2020
c81427c
Merge branch 'dev' into proc-entrypoint
araujof Jul 22, 2020
a6968c5
fixed union types in constants to comply with new avro schema
araujof Jul 22, 2020
534c881
mapped process flow in golang constants
araujof Jul 24, 2020
5399546
fixed sysprint build; changed time string formatting to iso
araujof Jul 24, 2020
1f66917
added object converter to convert goavro objects to sfgo objects
Jul 27, 2020
9d0cc4d
added node and schema version attributes to python api
araujof Jul 28, 2020
afbccca
Merge branch 'proc-entrypoint' of github.com:sysflow-telemetry/sf-api…
araujof Jul 28, 2020
5f84aa6
removed imagerepo attribute from container.avdl and regenerated class…
Jul 28, 2020
72d4a1a
updated flat constants
Jul 28, 2020
66c5664
fixed an issue with how the FOID is on a file event
Jul 29, 2020
4ed901d
reversting imageid name in python apis
araujof Jul 29, 2020
5e5623e
updated schema attribute name in JSON export format; updated CHANGELO…
araujof Jul 29, 2020
d0bcdee
Update CHANGELOG.md
araujof Aug 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ build
dist
*.egg-info
*.antlr
.vscode
*.ipynb_checkpoints/
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,26 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
> - **Fixed**: for any bug fixes.
> - **Security**: in case of vulnerabilities.

## [[UNRELEASED](https://github.com/sysflow-telemetry/sf-apis/compare/0.1-rc3...HEAD)]
## [[UNRELEASED](https://github.com/sysflow-telemetry/sf-apis/compare/0.1.0-rc4...HEAD)]

## [[0.1.0-rc4](https://github.com/sysflow-telemetry/sf-apis/compare/0.1-rc3...0.1.0-rc4)] - 2020-08-10

### Added

- Added `node.id`, `node.ip`, `proc.entry`, and `schema` attributes to query language and export APIs.
- Added golang APIs.

### Changed

- Support for new Avro schema (version 2).
- Added missing EXIT opflag to Python APIs.
- Adding patch level to comply with semnatic versioning.

### Fixed

- Fixed open flags bitmaps.
- Fixed attribute name typo when computing proc and pproc duration.
- Fixed bug in provenance queries.

## [[0.1-rc3](https://github.com/sysflow-telemetry/sf-apis/compare/0.1-rc2...0.1-rc3)] - 2020-03-17

Expand Down
16 changes: 8 additions & 8 deletions Dockerfile.sfnb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM jupyter/minimal-notebook
FROM jupyter/scipy-notebook

# Install pandas, numpy, and graphviz python bindings
RUN pip install graphviz pandas numpy matplotlib
# Install graphviz python bindings
RUN conda install -y graphviz

# Change user to root
Expand All @@ -14,12 +13,13 @@ RUN apt-get update -yqq && \
apt-get clean -yqq && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/lib/apt/archive/*

# Install sysflow API
COPY py3 /build
RUN cd /build && python setup.py install && rm -r /build
# Copy sources
COPY --chown=$NB_UID:$NB_UID py3 /tmp/build

# Switch back to jovyan to avoid accidental container runs as root
USER $NB_UID

# Copy example scripts into container
#COPY pynb /home/$NB_USER/work
# Install sysflow API
RUN cd /tmp/build && pip install . && rm -r /tmp/build


4 changes: 3 additions & 1 deletion Dockerfile.sysprint
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ FROM registry.access.redhat.com/ubi8/ubi

# Install Python environment
RUN dnf install -y --disableplugin=subscription-manager \
gcc \
python3 \
python3-wheel && \
python3-devel \
python3-wheel && \
dnf -y clean all && rm -rf /var/cache/dnf && \
mkdir -p /usr/local/lib/python3.6/site-packages && \
ln -s /usr/bin/easy_install-3 /usr/bin/easy_install
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Supported tags and respective `Dockerfile` links

- [`0.1-rc3`](https://github.com/sysflow-telemetry/sf-exporter/blob/0.1-rc3/Dockerfile), [`latest`](https://github.com/sysflow-telemetry/sf-apis/blob/master/Dockerfile)
- [`0.1.0-rc4`](https://github.com/sysflow-telemetry/sf-exporter/blob/0.1.0-rc4/Dockerfile), [`latest`](https://github.com/sysflow-telemetry/sf-apis/blob/master/Dockerfile)

# Quick reference

Expand Down
2 changes: 1 addition & 1 deletion avro/avdl/entity/file.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import idl "container.avdl";
record File {
sysflow.type.SFObjectState state; //state of file - created, modified, reupped
sysflow.type.FOID oid; // hash file id, container id, into 128 bit value.
timestamp_ms ts;
long ts;
int restype;
string path;
union{null, string} containerId;
Expand Down
5 changes: 3 additions & 2 deletions avro/avdl/entity/header.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
@namespace("sysflow.entity")
protocol SysFlow {
record SFHeader {
long version;
string exporter;
long version = 2;
string exporter;
string ip = "NA";
}
}
3 changes: 2 additions & 1 deletion avro/avdl/entity/process.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ record Process {
sysflow.type.SFObjectState state; //sysflow process object state.. created, modified, reupped
sysflow.type.OID oid; // monotonic process creation time + host PID
union{null, sysflow.type.OID} poid;
timestamp_ms ts;
long ts;
//int hpid;
string exe;
string exeArgs;
Expand All @@ -38,5 +38,6 @@ record Process {
//int threadCount;
//int childCount;
union{null, string} containerId;
boolean entry = false;
}
}
2 changes: 1 addition & 1 deletion avro/avdl/event/fileevent.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protocol SysFlow {
import idl "../type/datatypes.avdl";
record FileEvent {
sysflow.type.OID procOID; // host ID + monotonic process creation time + host PID
timestamp_ms ts;
long ts;
long tid;
int opFlags;
sysflow.type.FOID fileOID;
Expand Down
2 changes: 1 addition & 1 deletion avro/avdl/event/networkevent.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protocol SysFlow {
import idl "../type/datatypes.avdl";
record NetworkEvent {
sysflow.type.OID procOID; // host ID + monotonic process creation time + host PID
timestamp_ms ts;
long ts;
long tid;
int opFlags;
int sip;
Expand Down
2 changes: 1 addition & 1 deletion avro/avdl/event/processevent.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protocol SysFlow {
import idl "../type/datatypes.avdl";
record ProcessEvent {
sysflow.type.OID procOID; // host ID + monotonic process creation time + host PID
timestamp_ms ts;
long ts;
long tid;
int opFlags;
array<string> args;
Expand Down
4 changes: 2 additions & 2 deletions avro/avdl/flow/fileflow.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ protocol SysFlow {
import idl "../type/datatypes.avdl";
record FileFlow {
sysflow.type.OID procOID; // host ID + monotonic process creation time + host PID
timestamp_ms ts;
long ts;
long tid;
int opFlags;
int openFlags;
timestamp_ms endTs;
long endTs;
sysflow.type.FOID fileOID;
int fd;
long numRRecvOps;
Expand Down
4 changes: 2 additions & 2 deletions avro/avdl/flow/networkflow.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ protocol SysFlow {
import idl "../type/datatypes.avdl";
record NetworkFlow {
sysflow.type.OID procOID; // host ID + monotonic process creation time + host PID
timestamp_ms ts;
long ts;
long tid;
int opFlags;
timestamp_ms endTs;
long endTs;
int sip;
int sport;
int dip;
Expand Down
10 changes: 5 additions & 5 deletions avro/avdl/flow/processflow.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ protocol SysFlow {
import idl "../type/datatypes.avdl";
record ProcessFlow {
sysflow.type.OID procOID; // host ID + monotonic process creation time + host PID
timestamp_ms ts;
long tid;
long ts;
long numThreadsCloned;
int opFlags;
timestamp_ms endTs;
array<string> args;
int ret;
long endTs;
long numThreadsExited;
long numCloneErrors;
}
}
2 changes: 1 addition & 1 deletion avro/avdl/sysflow.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ import idl "entity/container.avdl";
import idl "entity/file.avdl";

record SysFlow {
union {sysflow.entity.SFHeader, sysflow.entity.Container, sysflow.entity.Process, sysflow.entity.File, sysflow.event.ProcessEvent, sysflow.flow.NetworkFlow, sysflow.flow.FileFlow, sysflow.event.FileEvent, sysflow.event.NetworkEvent} rec;
union {sysflow.entity.SFHeader, sysflow.entity.Container, sysflow.entity.Process, sysflow.entity.File, sysflow.event.ProcessEvent, sysflow.flow.NetworkFlow, sysflow.flow.FileFlow, sysflow.event.FileEvent, sysflow.event.NetworkEvent, sysflow.flow.ProcessFlow} rec;
}
}
29 changes: 5 additions & 24 deletions avro/avdl/type/datatypes.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -19,41 +19,22 @@
@namespace ("sysflow.type")

protocol SysFlow {
//fixed OID(16);

record OID {
timestamp_ms createTS;
long createTS;
long hpid;
}

/*record FOID {
long bits0;
long bits8;
long bits16;
}*/

fixed FOID(20);


fixed ContainerID(6);

/*enum EventType {
CLONE,
EXEC,
EXIT
}*/
enum SFObjectState {
CREATED,
MODIFIED,
REUP
}
/*
enum ResourceType {
SF_FILE,
SF_DIRECTORY,
SF_PIPE,
SF_UNIX
}*/
}

enum ContainerType {
CT_DOCKER,
Expand All @@ -63,9 +44,9 @@ enum ContainerType {
CT_RKT,
CT_CUSTOM,
CT_CRI,
CT_CONTAINERD,
CT_CRIO,
CT_BPM
CT_CONTAINERD,
CT_CRIO,
CT_BPM
}


Expand Down
Loading