Commit Graph

2642 Commits

Author SHA1 Message Date
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
arberkatellari
c7221f0d1e Add reader id within the *vars in ERs 2024-08-12 18:34:50 +02:00
gezimblliku
73a7590f1c added profiles,configs and services for trend && ranking 2024-08-02 09:37:52 +02:00
Gezim Blliku
80249e1074 implemented janusagent & added to services 2024-07-21 19:07:43 +02:00
gezimbll
18fa884ea1 revise integration tests 2024-06-07 17:18:23 +02:00
arberkatellari
ca815bb550 Add integration test for caching_delay 2024-03-06 16:16:08 +01:00
arberkatellari
de5db4a938 Add caching_delay to config and loaders 2024-03-06 16:16:08 +01:00
arberkatellari
830c7d4358 Update ansible kafka version to 3.7.0 2024-03-04 19:17:53 +01:00
arberkatellari
727f90fc6b Add CAPs counting to cgr-console status command 2024-03-04 19:17:53 +01:00
Bas Couwenberg
a5352bcc55 Update deb_packages playbook to support multiple distributions. 2024-02-27 16:27:07 +01:00
Bas Couwenberg
f510168246 Fix bash-term-in-posix-shell Lintian issue. 2024-02-27 16:27:07 +01:00
Bas Couwenberg
78d1a52063 Fix script-not-executable Lintian issue. 2024-02-27 16:27:07 +01:00
Bas Couwenberg
60e86f7bd2 Fix executable-not-elf-or-script Lintian issues. 2024-02-27 16:27:07 +01:00
Bas Couwenberg
915733e04e Pass commit date and hash to -ldflags separately. 2024-02-27 16:27:07 +01:00
arberkatellari
ca01cbcd6b Replacing old log_level from configs with new logger->level 2024-01-06 17:12:02 +01:00
ionutboangiu
d29f84169c Move cdrs to its own package
Moved engine/cdr.go to utils/cdr.go.
Moved engine/cdrs.go and engine/cdrs_test.go to cdrs package.
Moved api functions from cdrs/cdrs.go to cdrs/apis.go. Same for the
tests.
Deleted CDRsV1 type and its methods.
2023-12-12 10:09:18 +01:00
ionutboangiu
9e56246ba1 Update storage sql scripts for setting up cdr tables 2023-12-12 10:09:18 +01:00
ionutboangiu
9273761ed2 Use the proper cfg section to set log level 2023-12-12 10:09:18 +01:00
ionutboangiu
b56de12ee1 Bump mongodb version in ansible role 2023-10-26 16:26:27 +02:00
arberkatellari
0ca5d3ad20 Change default storedb password 2023-10-25 16:37:19 +02:00