Skip to content

app_audiocodes Error: Cannot find module 'filters/filter_app_audiocodes' #189

@myrcinos

Description

@myrcinos

Hi,
I have followed the documentation and installed the app_audiocodes filter. However, when I try to run the paStash with the recommended config file it does not work. In debug mode paStash displays the following error:

/opt/pastash$ sudo pastash --config_file=/opt/pastash/audiocodes.conf --log_level debug
[Sat, 04 May 2024 15:43:23 GMT] INFO Changing log_level debug
[Sat, 04 May 2024 15:43:23 GMT] NOTICE Starting pastash 1.0.80
[Sat, 04 May 2024 15:43:23 GMT] INFO Max http socket 100
[Sat, 04 May 2024 15:43:23 GMT] INFO Loading config file : /opt/pastash/audiocodes.conf
[Sat, 04 May 2024 15:43:23 GMT] INFO File loaded, 4 urls found
[Sat, 04 May 2024 15:43:23 GMT] INFO Loading config : 7 urls
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Loading urls [
'filter://add_host://',
'filter://add_timestamp://',
'filter://add_version://',
'input://udp://?host=0.0.0.0&port=514&type=syslog',
'filter://app_audiocodes://?version=7.20A.256.396&debug=false&autolocal=true&ini=%2Ftmp%2Faudiocodes.ini',
'output://stdout://',
'output://hep://?host=127.0.0.1&port=9060&hep_id=2222&dynamic_eval=%7B%22false_clauses%22%3A%5B%5D%2C%22true_clause%22%3A%7B%22op%22%3A%22!%3D%22%2C%22left%22%3A%7B%22field%22%3A%22rcinfo%22%7D%2C%22right%22%3A%7B%22value%22%3A%22undefined%22%7D%7D%7D'
]
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module output
[Sat, 04 May 2024 15:43:23 GMT] INFO Initializing output Stdout
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module output
[Sat, 04 May 2024 15:43:23 GMT] INFO Initializing output HEP/EEP Server
[Sat, 04 May 2024 15:43:23 GMT] INFO Start output to HEP udp to 127.0.0.1:9060
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module filter
[Sat, 04 May 2024 15:43:23 GMT] INFO Initializing filter AddHost
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module filter
[Sat, 04 May 2024 15:43:23 GMT] INFO Initializing filter AddTimestamp
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module filter
[Sat, 04 May 2024 15:43:23 GMT] INFO Initializing filter AddVersion
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module filter
[Sat, 04 May 2024 15:43:23 GMT] DEBUG no local module found filters filter_app_audiocodes Error: Cannot find module 'filters/filter_app_audiocodes'
Require stack:

  • /usr/local/lib/node_modules/@pastash/pastash/lib/agent.js
  • /usr/local/lib/node_modules/@pastash/pastash/bin/pastash
    at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
    at Module._load (node:internal/modules/cjs/loader:885:27)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at LogstashAgent.configure (/usr/local/lib/node_modules/@pastash/pastash/lib/agent.js:133:17)
    at LogstashAgent. (/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) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/usr/local/lib/node_modules/@pastash/pastash/lib/agent.js',
    '/usr/local/lib/node_modules/@pastash/pastash/bin/pastash'
    ]
    }
    Loading npm module... @pastash/filter_app_audiocodes
    [Sat, 04 May 2024 15:43:23 GMT] INFO Initializing filter AppAudiocodes
    [Sat, 04 May 2024 15:43:23 GMT] INFO Initialized App Audiocodes SysLog to SIP/HEP parser
    [Sat, 04 May 2024 15:43:23 GMT] INFO Reading INI file to resolver... /tmp/audiocodes.ini
    [Sat, 04 May 2024 15:43:23 GMT] INFO INI Loaded undefined Interfaces
    [Sat, 04 May 2024 15:43:23 GMT] INFO INI Loaded undefined SIP Profiles
    [Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module input
    [Sat, 04 May 2024 15:43:23 GMT] INFO Initializing input Udp
    [Sat, 04 May 2024 15:43:23 GMT] INFO Start listening on udp 0.0.0.0:514
    [Sat, 04 May 2024 15:43:23 GMT] INFO Config loaded.
    ^C[Sat, 04 May 2024 15:46:25 GMT] INFO SIGINT received.
    [Sat, 04 May 2024 15:46:25 GMT] INFO Closing listening udp 0.0.0.0:514
    [Sat, 04 May 2024 15:46:25 GMT] INFO Closing stdout
    [Sat, 04 May 2024 15:46:25 GMT] INFO Closing output to HEP udp to 127.0.0.1:9060
    [Sat, 04 May 2024 15:46:25 GMT] INFO Closing agent
    [Sat, 04 May 2024 15:46:25 GMT] INFO Quitting.

I use the following config file:

input {
udp {
host => 0.0.0.0
port => 514
type => syslog
}
}

filter {
app_audiocodes{
#version => '7.40A.100.114'
version => '7.20A.256.396'
debug => false
autolocal => true
ini => '/tmp/audiocodes.ini'
}
}

output {
stdout{}
if [rcinfo] != 'undefined' {
hep {
host => '127.0.0.1'
port => 9060
hep_id => 2222
}
}
}

The INI file is in the /tmp folder.
Here is my npm and node version:
node -v
v18.13.0
npm -v
9.2.0
myrcin@ZabbixSRV:/opt/pastash$

Also during the installation of the app_audiocodes I got the following warnings:

image

What am I doing wrong? Even though, paStash seems to be running, it does not send any data. Any help is highly appreciated.

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