Commit Graph

14020 Commits

Author SHA1 Message Date
ionutboangiu
caebee4eab Fix failing elastic exporter test
does not expect OriginID field to be present anymore if exporting without
defining any templates. Not defining them means only the Event will be
exported as is, while OriginID is part of APIOpts.
2025-03-09 17:27:31 +01:00
ionutboangiu
2c8c9b326e remove previous prometheus integration 2025-03-09 17:27:31 +01:00
ionutboangiu
6f0ce88ae2 add test for new prometheus agent implementation 2025-03-09 17:27:31 +01:00
ionutboangiu
4e46f8dbd9 add PrometheusAgent implementation 2025-03-09 17:27:31 +01:00
ionutboangiu
875fdb3993 implement config object for prometheus_agent 2025-03-09 17:27:31 +01:00
ionutboangiu
00c192251d fix checksum mismatch in ansible go role 2025-03-01 07:26:37 +01:00
ionutboangiu
47fb574aef revise failing integration test
failing due to 56dfa4ee21
warning error is not returned anymore, only logged
2025-02-26 19:52:58 +01:00
ionutboangiu
56dfa4ee21 prevent data race in file watcher goroutine 2025-02-26 16:19:08 +01:00
gezimbll
5628a31852 updated rsyslog conf to include logs with tag CGRateS 2025-02-26 16:17:03 +01:00
gezimbll
8fd871b304 added log level field on stordb opts for controlling sql verbosity 2025-02-25 19:42:11 +01:00
ionutboangiu
4ad5bee6ab move failing tests to flaky 2025-02-24 13:36:32 +01:00
ionutboangiu
deaf5f4918 Move config/objdp.go to utils package
and rename the file to objectdp.go
2025-02-24 13:36:32 +01:00
ionutboangiu
3254e0d35f Export RSRParser Path field
configsanity and its tests need access to it
2025-02-24 13:36:32 +01:00
ionutboangiu
b1a5874215 Move config/rsrparser.go to utils package 2025-02-24 13:36:32 +01:00
ionutboangiu
36a7d174ab Remove RSRSep opt from general section
- allows RSRParser to be split gracefully from config (was depending on
  RSRSep, which was retrieved from the global config variable)
- default separator (;) was the only one used except for splitting
  inline attribute values (where ANDSep is used)
2025-02-24 13:36:32 +01:00
ionutboangiu
c60712f454 Bump go version to 1.24.0 2025-02-21 13:22:04 +01:00
armirveliaj
4b1e6e7def Add coverage tests on engine 2025-02-20 12:05:39 +01:00
armirveliaj
ad0b45b4d2 Add coverage tests on accounts && engine 2025-02-20 12:05:39 +01:00
gezimbll
18b0e4d417 added new dynopts function GetDurationPointerOpts 2025-02-20 09:54:13 +01:00
gezimbll
14515404bb added helper method for repetive logic on GetOpts funcs 2025-02-13 19:18:40 +01:00
armirveliaj
d2c175141f Add coverage tests on SessionS 2025-02-13 19:17:20 +01:00
armirveliaj
ae8564ad50 Add coverage tests on sessionS 2025-02-07 13:26:56 +01:00
armirveliaj
6928674716 Add coverage tests on SessionS 2025-02-07 13:26:56 +01:00
armirveliaj
c34ae82539 Convert CDR.Opts[*accountsCost] to *utils.EventCharges 2025-02-07 13:26:56 +01:00
ionutboangiu
f89cad421e Revise service toggle test 2025-02-07 13:23:59 +01:00
ionutboangiu
1d536c6390 Revise ServiceManagerV1.Status API
Allows querying for the status of all/multiple services at once.
Reply becomes a map[string]string, where the key is the service name
and the value represents the name of the state the service is in
(instead of returning just RUNNING/STOPPED).
2025-02-07 13:23:59 +01:00
ionutboangiu
712aeb0d4a Revise StateDeps implementation
Now tracks states by passing around an empty struct as a signal to
states defined on the service, as opposed to signal state changes by
closing the channel. This makes sure services can only be in one
state at once and allows for multiple state changes which were not
possible before.
2025-02-07 13:23:59 +01:00
gezimbll
df3dcfb840 replaced CGREvent parameter to DataProvider for GetOpts functions 2025-02-07 13:18:43 +01:00
gezimbll
3ebf3007a5 added startdelay config option for ers readers 2025-01-29 14:44:28 +01:00
ionutboangiu
92cdda136b Update elasticsearch ansible role
- bump version from 8.8.0 to 8.16.1
- don't enable the systemd service by default(just start it)
- add restart handler on config changes
- configure before starting the service
- fix some linter errors
- hardcode auto_create_indexes to true
2025-01-29 10:52:24 +01:00
ionutboangiu
9bc51e7e64 Revise elasticsearch exporter integration test 2025-01-29 10:52:24 +01:00
ionutboangiu
ea25caa9fb Add missing els clone and AsMapIface logic 2025-01-29 10:52:24 +01:00
ionutboangiu
2eebc7a236 Add config sanity checks for elasticsearch ee 2025-01-29 10:52:24 +01:00
ionutboangiu
92658d854e Add elsCAPath opt and improve opt comments 2025-01-29 10:52:24 +01:00
ionutboangiu
f1b8fb8f40 Update default config sample 2025-01-29 10:52:24 +01:00
ionutboangiu
9ac147f3a3 Properly document elastic index req opts 2025-01-29 10:52:24 +01:00
ionutboangiu
9b9c7bb914 Make elasticsearch refresh opt configurable 2025-01-29 10:52:24 +01:00
ionutboangiu
c1331531a7 Remove unusable elasticsearch opts 2025-01-29 10:52:24 +01:00
ionutboangiu
035bac3688 elasticsearch: switch to fully-typed API
- index request options are now used directly during ExportEvent. They are
  passed to the request as options only if they were configured in the first
  place.
- implement PrepareMap and PrepareOrderMap methods for the elastic exporter.
  bytePreparing methods are not needed anymore as the Event map can be exported
  directly.
- elasticsearch.Client -> elasticsearch.TypedClient
- rename prepareOpts -> parseClientOpts
2025-01-29 10:52:24 +01:00
ionutboangiu
3a0579a8ea Slightly refactor elastic exporter
now returns error in case of invalid logger type. Could be removed
in the future in favor of handling it in configsanity.go.
2025-01-29 10:52:24 +01:00
ionutboangiu
39ef7df677 Add context to ee constructor errors 2025-01-29 10:52:24 +01:00
ionutboangiu
e3b5c9ef84 Implement getter method for EventExporterCfg (by ID)
Removed redundant getter method for default EventExporterCfg.
2025-01-29 10:52:24 +01:00
ionutboangiu
5bd439020c Prevent deadlock inside *els Connect 2025-01-29 10:52:24 +01:00
armirveliaj
a05834af81 Adding *accountsForceUsage variables for GetBoolOpts 2025-01-29 10:49:15 +01:00
armirveliaj
cae468454c Adding *sessionSOriginID StringOpts variables 2025-01-29 10:49:15 +01:00
ionutboangiu
652d1e68cf Remove cls fields from service structs
now retrieved through registry.Lookup
2025-01-24 12:02:24 +01:00
gezimbll
06ccafb5fd added tests for opts with dynamic values 2025-01-22 17:36:26 +01:00
gezimbll
c602dbc2a5 added rsparser field in dynamicOpts
changed Value field to unexported and created a Value() method
on each dynOpts type that contains logic to create a rsparser
in case the value field a configuration starts with prefix "~"
otherwise it will return the specified value
2025-01-22 17:36:26 +01:00
ionutboangiu
de87ab04ad Add short comments to all cgr-engine.go functions 2025-01-21 19:59:17 +01:00
ionutboangiu
3f0bb4df43 Move libcgr-engine into cgr-engine.go + flags refactor 2025-01-21 19:59:17 +01:00