Commit Graph

2661 Commits

Author SHA1 Message Date
ionutboangiu
3d76af47bc Revise IPProfile definition + tests 2025-06-03 13:10:15 +02:00
ionutboangiu
eed6b8a51a add implementation for new ips module 2025-05-29 15:46:42 +02:00
ionutboangiu
180eb6cbfd extract resources apis to different file 2025-05-29 15:46:42 +02:00
ionutboangiu
d02bfac20b Fix rsyslog config to capture logs across distros
Add three conditions to properly capture CGRateS logs:

- programname startswith 'cgr-engine': catches logs from external
  libraries that don't use our syslogger (e.g. diameter conn errors)
- programname startswith 'CGRateS': handles deb-based distros
  where our syslog tag becomes the program name
- msg contains 'CGRateS': handles rpm-based distros where systemd
  journal overrides programname but our tag remains in message content
2025-05-27 17:30:30 +02:00
arberkatellari
7fe60c2b8b fix failing tests 2025-05-18 16:21:37 +02:00
arberkatellari
5847ceab00 Add and revise tests for offline internal DB 2025-05-13 17:07:17 +02:00
ionutboangiu
961f132efb remove redundant dist entry in reprepro cfg 2025-05-08 16:31:10 +02:00
arberkatellari
7363e29f93 Revise deb_packages script and update Go version 2025-04-18 13:18:37 +02:00
gezimbll
1f686fca63 added RequestProcessors in fsAgent 2025-03-11 18:12:49 +01:00
ionutboangiu
2c8c9b326e remove previous prometheus integration 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
gezimbll
5628a31852 updated rsyslog conf to include logs with tag CGRateS 2025-02-26 16:17:03 +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
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
f1b8fb8f40 Update default config sample 2025-01-29 10:52:24 +01:00
ionutboangiu
c1331531a7 Remove unusable elasticsearch opts 2025-01-29 10:52:24 +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
armirveliaj
4ce506faa9 Clean up redundant tests 2025-01-17 17:29:46 +01:00
armirveliaj
ef79d370d8 Clean up dispatcherS from storage 2025-01-17 17:29:46 +01:00
armirveliaj
7db65ca62c Clean up DispatcherS 2025-01-17 17:29:46 +01:00
ionutboangiu
ff929c9f2a Revise and document rpc exporter it test 2025-01-08 20:32:55 +01:00
ionutboangiu
4d9c0cb077 Bump mongo ansible role default version 2025-01-08 20:32:55 +01:00
ionutboangiu
e51eed46e7 Revise analyzers integration test 2024-12-05 20:12:08 +01:00
gezimbll
1c6c733a3f added dispatcher methods for rankings and trends 2024-11-22 20:29:27 +01:00
gezimbll
bb0116c543 added it test && loaders templates for ranking and trend profiles 2024-11-22 20:29:27 +01:00
ionutboangiu
40c5d65af6 Add benchmark for diameter+caps
unusable until sessions is finished
2024-11-04 21:22:58 +01:00
ionutboangiu
213b67fbb0 Revise registrarc integration test 2024-11-04 21:22:58 +01:00
ionutboangiu
ad104573e9 Remove concurrent_requests diameter opt
Will be replaced by caps.
2024-11-04 21:22:58 +01:00
gezimbll
132a2b3bf9 rankings,trends: added implementation,services and tests 2024-11-04 19:03:21 +01:00
ionutboangiu
0dfe689d8e Add postgres stor_db SSL opts 2024-11-03 13:19:45 +01:00
ionutboangiu
b2e25047bb Improve alignment inside config_defaults file 2024-11-01 15:59:39 +01:00
ionutboangiu
c7dbcaea03 Revise CPU/Memory profiling
CPU profiling changes:

cgr-engine.go:
- use filepath.Join instead of path.Join
- handle *CoreService.StopCPUProfiling error inside deferred function
- same with the error from *os.File.Close()

cores/core.go:
- StartCPUProfile now returns an *os.File (as opposed to an io.WriteCloser),
  because os.File.Stat is used beforehand to check if a handler of the file is
  already active and confirm the status of profiling.  Asserting the type would
  have worked as well.
- handle pprof.StartCPUProfile error and ensure file is closed before returning
- log file close error as a warning if it occurs
- return missing mandatory error with correct path field name ('DirPath')
- no need to check if fileCPU is nil for profiling status
  - pprof.StartCPUProfiling will return an error if profiling is already started
  - os.File.Close() will return ErrClosed if profiling is already stopped
- differentiate between calling StopCPUProfiling when profiling hasn't started
and when it was already stopped by returning appropriate errors

Memory profiling changes:

- merge StopChanMemProf with StopMemoryProfiling
- remove fileMEM and stopMemProf from struct and constructors
- add separate mutex for memory profiling, ensure thread safety
- handle all significant errors
- log error if StopMemoryProfiling fails during CoreS Shutdown
- ignore errors if profiling inactive in Shutdown and deferred Stop
- move validations inside V1 functions
- return error if StartMemoryProfiling already started
- return error if StopMemoryProfiling already stopped or never started
- close profiling loop on error, not the cgr-engine
- StopMemoryProfiling closes channel and profiling loop writes final profile
- rename Path to DirPath for mandatory field error
- rename memprof_nrfiles flag to memprof_maxfiles
- increase default memprof_interval
- consider MaxFiles <= 0 as unlimited
- move memory profiling logic after starting services
- use CoreService Start/StopMemoryProfiling in main
- remove final memory profile block (created by deferred Stop)
- convert MemProfiling to method on CoreService and rename to profileMemory
- use Ticker for recurrent actions instead of Timer
- compute mem_final.prof full path in StartMemoryProfiling
- suffix profile files with current time instead of numbers
- update dispatcher methods after changes
- move MemoryPrf from utils to cores, rename to MemoryProfilingParams
- add logs for starting/stopping profiling
- added the possibility to disable timestamps in the memory profile file names
  and use increments of 1 instead.

Other changes:

- improved integration tests for flags (now table tests)
- improved profiling integration tests
2024-11-01 15:59:39 +01:00
ionutboangiu
8447952c4c Update sample json configuration file 2024-10-23 21:11:25 +02:00
ionutboangiu
192df0b456 Remove redundant go_upgrade ansible playbook
combining the go+cgrates roles achieves the same functionality
2024-10-23 21:11:25 +02:00
ionutboangiu
941ee55fab Remove unused ansible files
all of them replaced by roles
2024-10-23 21:11:25 +02:00
ionutboangiu
682f52e3dd Revise kafka SSL test
- Updated to use the test suite
- Deleted kafka_ssl sample configuration (moved to test file)
- Revised Kafka server SSL setup comment
- Ensured exporters are synchronous to avoid missing errors
- Implemented helper function to create and clean up kafka topics
- ERs sometimes took too long to receive a message.
  Setting kafkaGroupID to "" prevents this.
- Kafka reader took 10s to close (default MaxWait).
  Set MaxWait to 1ms.
- Exporters took 1s each to export due to BatchSize
  not being hit. Set BatchSize to 1 to prevent it.
2024-10-23 21:11:25 +02:00
ionutboangiu
9b8ac3199b Revise EfSv1.ReplayEvents API + tests
- renamed parameter type: ArgsReplyFailedPosts -> ReplayEventsParams
- renamed param fields:
  - FailedRequestsInDir -> SourcePath
  - FailedRequestsOutDir -> FailedPath
  - TypeProvider -> Provider
- changed param fields types from *string to string
- used the SourcePath and FailedPath params directly instead of creating separate variables
- used filepath.WalkDir instead of reading the directory and looping over the entries
- used slices.ContainsFunc to check if the file belongs to any module (if 1+ is specified)
- used filepath.Join instead of path.Join
- used the path provided by WalkFunc instead of building the file paths ourselves
- made error returns more descriptive
- added logs for directories/files that are skipped
- paths that cannot be accessed are skipped after logging the error
2024-09-25 20:58:51 +02:00
ionutboangiu
65e8128303 Implement ErSv1.RunReader api 2024-09-23 20:28:26 +02:00
ionutboangiu
5e27106e48 Update main cgr-engine config sample 2024-09-23 20:28:26 +02:00
gezimblliku
0f81b78321 updated trend profile && trends service implementation 2024-09-23 11:48:04 +02:00
ionutboangiu
edfe2b5ef7 Revise nats reader integration tests
They were failing after the ERs structure changes.

Added a commented helper program at the end of the test to
help generate credentials for testing nats JWT functionality
2024-09-20 11:24:37 +02:00
ionutboangiu
c0d800d3d0 Add shebang for postgres scripts 2024-09-05 20:46:40 +02:00
ionutboangiu
3764594fcc revise logging .conf files 2024-09-05 20:46:40 +02:00
ionutboangiu
66b334f6fb port calls ansible playbooks 2024-09-05 20:46:40 +02:00
ionutboangiu
fa1fa05af6 port ansible role changes
new: freediameter, grafana, node_exporter, prometheus, opensips,
sipp

updated: cgrates, go, kafka, mongodb, nats, pjsua, postgresql,
2024-09-05 20:46:40 +02:00
ionutboangiu
fbdc6f015a bump go version 2024-08-21 20:59:10 +02:00
ionutboangiu
17814fb88d update kafka version in role (3.7.0->3.8.0) 2024-08-21 20:59:10 +02:00
arberkatellari
91630f39a5 Add exporter id within the *vars in EEs for templates 2024-08-14 14:06:03 +02:00