Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
./make.bat mc
./make.bat
env:
TAGS: kcap,filament,yara,yara_static
TAGS: cap,filament,yara,yara_static
- uses: actions/upload-artifact@v4
with:
name: "fibratus-amd64.exe"
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
export PKG_CONFIG_PATH=$(pwd)/pkg-config
./make.bat test
env:
TAGS: kcap,yara,yara_static
TAGS: cap,yara,yara_static

lint:
runs-on: windows-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
./make.bat mc
./make.bat
env:
TAGS: kcap,filament,yara,yara_static
TAGS: cap,filament,yara,yara_static
- uses: actions/upload-artifact@v4
with:
name: "fibratus-amd64.exe"
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
export PKG_CONFIG_PATH=$(pwd)/pkg-config
./make.bat test
env:
TAGS: kcap,yara,yara_static
TAGS: cap,yara,yara_static

lint:
runs-on: windows-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
./make.bat mc
./make.bat
env:
TAGS: kcap,filament,yara,yara_static
TAGS: cap,filament,yara,yara_static
- name: Install Wix
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
run:
build-tags:
- kcap
- cap
- filament
deadline: 10m

Expand Down
2 changes: 1 addition & 1 deletion cmd/fibratus/app/capture/capture_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

var Command = &cobra.Command{
Use: "capture [filter]",
Short: "Capture event stream to the kcap (capture) file",
Short: "Capture event stream to the cap (capture) file",
RunE: capture,
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/fibratus/app/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"github.com/rabbitstack/fibratus/internal/bootstrap"
"github.com/rabbitstack/fibratus/pkg/config"
kerrors "github.com/rabbitstack/fibratus/pkg/errors"
errs "github.com/rabbitstack/fibratus/pkg/errors"
"github.com/rabbitstack/fibratus/pkg/util/rest"
"github.com/spf13/cobra"
"os"
Expand All @@ -49,7 +49,7 @@ func printConfig(cmd *cobra.Command, args []string) error {
}
body, err := rest.Get(rest.WithTransport(cfg.API.Transport), rest.WithURI("config"))
if err != nil {
return kerrors.ErrHTTPServerUnavailable(cfg.API.Transport, err)
return errs.ErrHTTPServerUnavailable(cfg.API.Transport, err)
}
_, err = fmt.Fprintln(os.Stdout, string(body))
if err != nil {
Expand Down
15 changes: 7 additions & 8 deletions cmd/fibratus/app/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/jedib0t/go-pretty/v6/table"
"github.com/rabbitstack/fibratus/internal/bootstrap"
"github.com/rabbitstack/fibratus/pkg/config"
"github.com/rabbitstack/fibratus/pkg/event"
"github.com/rabbitstack/fibratus/pkg/filter/fields"
"github.com/rabbitstack/fibratus/pkg/kevent/ktypes"
"github.com/spf13/cobra"
"os"
"path/filepath"
Expand All @@ -34,7 +34,7 @@ import (

var Command = &cobra.Command{
Use: "list",
Short: "Show info about filaments, filter fields or kernel event types",
Short: "Show info about filaments, filter fields or event types",
}

var listFilamentsCmd = &cobra.Command{
Expand All @@ -50,10 +50,9 @@ var listFieldsCmd = &cobra.Command{
}

var listEventsCmd = &cobra.Command{
Use: "kevents",
Aliases: []string{"events"},
Short: "List supported kernel event types",
Run: listEvents,
Use: "events",
Short: "List supported event types",
Run: listEvents,
}

var cfg = config.NewWithOpts(config.WithList())
Expand Down Expand Up @@ -131,8 +130,8 @@ func listEvents(cmd *cobra.Command, args []string) {
t.AppendHeader(table.Row{"Name", "Category", "Description"})
t.SetStyle(table.StyleLight)

for _, ktyp := range ktypes.GetKtypesMeta() {
t.AppendRow(table.Row{ktyp.Name, ktyp.Category, ktyp.Description})
for _, ev := range event.GetTypesMeta() {
t.AppendRow(table.Row{ev.Name, ev.Category, ev.Description})
}

t.Render()
Expand Down
2 changes: 1 addition & 1 deletion cmd/fibratus/app/replay/replay_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

var Command = &cobra.Command{
Use: "replay",
Short: "Replay event stream from the kcap (capture) file",
Short: "Replay event stream from the cap (capture) file",
RunE: replay,
}

Expand Down
57 changes: 28 additions & 29 deletions cmd/fibratus/app/stats/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"github.com/jedib0t/go-pretty/v6/table"
"github.com/rabbitstack/fibratus/pkg/config"
kerrors "github.com/rabbitstack/fibratus/pkg/errors"
errs "github.com/rabbitstack/fibratus/pkg/errors"
"github.com/rabbitstack/fibratus/pkg/util/rest"
"github.com/spf13/cobra"
)
Expand All @@ -47,13 +47,13 @@ func init() {
type Stats struct {
AggregatorBatchEvents int `json:"aggregator.batch.events"`
AggregatorFlushesCount int `json:"aggregator.flushes.count"`
AggregatorKeventErrors int `json:"aggregator.kevent.errors"`
AggregatorEventErrors int `json:"aggregator.event.errors"`
AggregatorTransformerErrors map[string]int `json:"aggregator.transformer.errors"`
AggregatorWorkerClientPublishErrors int `json:"aggregator.worker.client.publish.errors"`
FilamentKdictErrors int `json:"filament.kdict.errors"`
FilamentKeventBatchFlushes int `json:"filament.kevent.batch.flushes"`
FilamentKeventErrors map[string]int `json:"filament.kevent.errors"`
FilamentKeventProcessErrors int `json:"filament.kevent.process.errors"`
FilamentDictErrors int `json:"filament.dict.errors"`
FilamentEventBatchFlushes int `json:"filament.event.batch.flushes"`
FilamentEventErrors map[string]int `json:"filament.event.errors"`
FilamentEventProcessErrors int `json:"filament.event.process.errors"`
FilterAccessorErrors map[string]int `json:"filter.accessor.errors"`
FsFileObjectHandleHits int `json:"fs.file.object.handle.hits"`
FsFileObjectMisses int `json:"fs.file.object.misses"`
Expand All @@ -67,28 +67,27 @@ type Stats struct {
HandleTypeNameMisses int `json:"handle.type.name.misses"`
HandleWaitTimeouts int `json:"handle.wait.timeouts"`
HostnameErrors map[string]int `json:"hostname.errors"`
KcapFlusherErrors map[string]int `json:"kcap.flusher.errors"`
KcapHandleWriteErrors int `json:"kcap.handle.write.errors"`
KcapKeventUnmarshalErrors int `json:"kcap.kevent.unmarshal.errors"`
KcapKeventWriteErrors int `json:"kcap.kevent.write.errors"`
KcapKstreamConsumerErrors int `json:"kcap.kstream.consumer.errors"`
KcapOverflowErrors int `json:"kcap.overflow.errors"`
KcapReadBytes int `json:"kcap.read.bytes"`
KcapReadKevents int `json:"kcap.read.kevents"`
KcapReaderDroppedByFilter int `json:"kcap.reader.dropped.by.filter"`
KcapReaderHandleUnmarshalErrors int `json:"kcap.reader.handle.unmarshal.errors"`
KeventPrcoessorFailures int `json:"kevent.processor.failures"`
KeventSeqInitErrors map[string]int `json:"kevent.seq.init.errors"`
KeventSeqStoreErrors int `json:"kevent.seq.store.errors"`
KeventTimestampUnmarshalErrors int `json:"kevent.timestamp.unmarshal.errors"`
KstreamDroppedKevents int `json:"kstream.dropped.kevents"`
KstreamKbuffersRead int `json:"kstream.kbuffers.read"`
KstreamKeventsEnqueued int `json:"kstream.kevents.enqueued"`
KstreamKeventsDequeued int `json:"kstream.kevents.dequeued"`
KstreamUnknownKevents int `json:"kstream.kevents.unknown"`
KstreamKeventsProcessed int `json:"kstream.kevents.processed"`
KstreamExcludedKevents int `json:"kstream.excluded.kevents"`
KstreamKeventsFailures map[string]int `json:"kstream.kevents.failures"`
CapFlusherErrors map[string]int `json:"cap.flusher.errors"`
CapHandleWriteErrors int `json:"cap.handle.write.errors"`
CapEventUnmarshalErrors int `json:"cap.event.unmarshal.errors"`
CapEventWriteErrors int `json:"cap.event.write.errors"`
CapEventSourceConsumerErrors int `json:"cap.eventsource.consumer.errors"`
CapOverflowErrors int `json:"cap.overflow.errors"`
CapReadBytes int `json:"cap.read.bytes"`
CapReadEvents int `json:"cap.read.events"`
CapReaderDroppedByFilter int `json:"cap.reader.dropped.by.filter"`
CapReaderHandleUnmarshalErrors int `json:"cap.reader.handle.unmarshal.errors"`
EventProcessorFailures int `json:"event.processor.failures"`
EventSeqInitErrors map[string]int `json:"event.seq.init.errors"`
EventSeqStoreErrors int `json:"event.seq.store.errors"`
EventTimestampUnmarshalErrors int `json:"event.timestamp.unmarshal.errors"`
EventSourceBuffersRead int `json:"eventsource.buffers.read"`
EventSourceEventsEnqueued int `json:"eventsource.events.enqueued"`
EventSourceEventsDequeued int `json:"eventsource.events.dequeued"`
EventSourceUnknownEvents int `json:"eventsource.events.unknown"`
EventSourceEventsProcessed int `json:"eventsource.events.processed"`
EventSourceExcludedEvents int `json:"eventsource.excluded.events"`
EventSourceEventsFailures map[string]int `json:"eventsource.events.failures"`
LoggerErrors map[string]int `json:"logger.errors"`
OutputAMQPChannelFailures int `json:"output.amqp.channel.failures"`
OutputAMQPConnectionFailures int `json:"output.amqp.connection.failures"`
Expand Down Expand Up @@ -124,7 +123,7 @@ func stats(cmd *cobra.Command, args []string) error {
c := cfg.API
body, err := rest.Get(rest.WithTransport(c.Transport), rest.WithURI("debug/vars"))
if err != nil {
return kerrors.ErrHTTPServerUnavailable(c.Transport, err)
return errs.ErrHTTPServerUnavailable(c.Transport, err)
}
var stats Stats
if err := json.Unmarshal(body, &stats); err != nil {
Expand Down
6 changes: 3 additions & 3 deletions configs/fibratus.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"init-snapshot": true
},

"kevent": {
"event": {

},

"kcap": {
"cap": {

},

"kstream": {},
"eventsource": {},
"logging": {},

"output": {
Expand Down
Loading
Loading