Skip to content

Filter GROK not working in container env. #234

Closed
@spady7

Description

@spady7

Hi,
I have a problem when I try to use the "grok" filter. From what I read, if I understand correctly, it was part of the pastash installation. Then it was moved as an additional filter.
If I try to install it I get the following error:

# npm install --unsafe-perm -g @pastash/filter_grok
npm error code E404
npm error 404 Not Found - GET https://registry.npmjs.org/@pastash%2ffilter_grok - Not found
npm error 404
npm error 404  '@pastash/filter_grok@*' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm error A complete log of this run can be found in: /root/.npm/_logs/2024-08-21T14_40_24_796Z-debug-0.log

If I try to start a configuration that uses grok, at startup I get the following error:

[Wed, 21 Aug 2024 14:42:38 GMT] NOTICE Starting pastash 1.0.82
[Wed, 21 Aug 2024 14:42:38 GMT] INFO Max http socket 100
[Wed, 21 Aug 2024 14:42:38 GMT] INFO Loading config files from : /config
[Wed, 21 Aug 2024 14:42:38 GMT] INFO Files loaded from directory, 4 urls found
[Wed, 21 Aug 2024 14:42:38 GMT] INFO Loading config : 7 urls
[Wed, 21 Aug 2024 14:42:38 GMT] INFO Initializing output Stdout
[Wed, 21 Aug 2024 14:42:38 GMT] INFO Initializing output file
[Wed, 21 Aug 2024 14:42:38 GMT] INFO Start output to file /usr/src/app/output_testing.json
[Wed, 21 Aug 2024 14:42:38 GMT] INFO Initializing filter AddHost
[Wed, 21 Aug 2024 14:42:38 GMT] INFO Initializing filter AddTimestamp
[Wed, 21 Aug 2024 14:42:38 GMT] INFO Initializing filter AddVersion
Loading npm module... @pastash/filter_grok
[Wed, 21 Aug 2024 14:42:38 GMT] ERROR Unable to load urls from command line
[Wed, 21 Aug 2024 14:42:38 GMT] ERROR TypeError: Cannot read properties of undefined (reading 'create')
    at LogstashAgent.configure (/usr/local/lib/node_modules/@pastash/pastash/lib/agent.js:143:21)
    at LogstashAgent.<anonymous> (/usr/local/lib/node_modules/@pastash/pastash/lib/agent.js:215:10)
    at /usr/local/lib/node_modules/@pastash/pastash/node_modules/async/dist/async.js:3113:16
    at replenish (/usr/local/lib/node_modules/@pastash/pastash/node_modules/async/dist/async.js:1014:17)
    at /usr/local/lib/node_modules/@pastash/pastash/node_modules/async/dist/async.js:1019:9
    at eachLimit$1 (/usr/local/lib/node_modules/@pastash/pastash/node_modules/async/dist/async.js:3199:24)
    at Object.<anonymous> (/usr/local/lib/node_modules/@pastash/pastash/node_modules/async/dist/async.js:1049:16)
    at LogstashAgent.start_modules (/usr/local/lib/node_modules/@pastash/pastash/lib/agent.js:214:9)
    at LogstashAgent.start_filters (/usr/local/lib/node_modules/@pastash/pastash/lib/agent.js:255:8)
    at LogstashAgent.<anonymous> (/usr/local/lib/node_modules/@pastash/pastash/lib/agent.js:204:10)

Can you help me?
Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions