Commit Graph

2780 Commits

Author SHA1 Message Date
ionutboangiu
fdc8a1be7e ees: implement api to reset exporter metrics 2025-03-17 17:36:58 +01:00
ionutboangiu
934815d9ee ees: add metrics_reset_schedule opt (per ee) 2025-03-17 17:36:58 +01:00
ionutboangiu
7f132f19e4 Bump go version to 1.24.0 2025-02-26 16:19:47 +01:00
gezimbll
322afc585f added default caching for exporters 2025-02-21 13:21:26 +01:00
gezimbll
1a9313be68 revised integration tests for ranking scheduling 2024-12-10 18:51:43 +01:00
gezimbll
ee312b13b6 Added dispatchers it tests for rankings and trends 2024-11-23 20:01:25 +01:00
gezimbll
fc6aff8484 added trends and rankings methods in dispatchers 2024-11-14 17:52:31 +01:00
gezimbll
0854ef0bbb disabled refunding for *rated requesttype 2024-11-08 15:00:52 +01:00
armirveliaj
b2a76a1a84 Revise it test from v1/apier2_it_test.go 2024-11-04 19:01:41 +01:00
gezimbll
f72d4defb4 added *rankings filters in dynamicDP 2024-10-30 22:14:03 +01:00
gezimbll
b8616282ee added integration tests for ranking scheduling 2024-10-30 22:14:03 +01:00
armirveliaj
1a38e51a5d Add new API: RankingSv1.GetRankingSummary 2024-10-23 20:25:07 +02:00
DanB
14292a77ea RankingSummary structure, LastUpdate timestamp inside Ranking struct, Ranking documentation 2024-10-18 18:53:58 +02:00
gezimbll
2e192dde78 added trend dynamicDP in filters and GetTrendSummary API 2024-10-18 16:24:02 +02:00
gezimbll
88805ac074 added get/set methods for ranking in datamanager 2024-10-17 15:54:53 +02:00
gezimbll
1765be1247 modified ranking csv and model 2024-10-17 12:17:21 +02:00
ionutboangiu
4ec26a4996 Move test cgr-engine helpers to engine package 2024-10-16 12:24:54 +02:00
gezimbll
e518e7b913 Integration test for scheduleAutomaticQueries && api for scheduled trends 2024-10-08 20:49:13 +02:00
gezimbll
06a9e1b661 changed DataManager.GetTrendProfiles to GetTrendProfileIDs with new signature 2024-10-03 17:43:26 +02:00
gezimbll
b134df83b7 added it tests and new APIs for TrendS 2024-10-01 20:05:29 +02:00
arberkatellari
3df926c642 Improve V1ReprocessCDRs flags handling 2024-09-24 12:29:41 +02:00
arberkatellari
c7e7634189 Add CDRsV1.ReprocessCDRs 2024-09-23 11:52:31 +02:00
armirveliaj
407f5fa062 Add new unit tests on apier/v1 2024-09-23 11:51:47 +02:00
gezimblliku
187ac2e0c9 updated profile and model fields for trends 2024-09-17 18:17:28 +02:00
arberkatellari
bcb089822f Add APIerSV1TimingIsActiveAt 2024-09-17 18:13:41 +02:00
arberkatellari
f6879d1a24 Revise SetActions APIs 2024-09-16 20:59:38 +02:00
DanB
569ddd1956 Basic structure of TrendS using cron as scheduler 2024-09-09 20:53:51 +02:00
ionutboangiu
62c30ab539 improve CoreSv1.Status API with more detailed metrics
- add new metrics (off by default)
- add Debug boolean option for full metric details
- add Timezone option for 'running_since' field
- update default metrics shown and their constants
- remove utils.GetStartTime(), now use process metrics
2024-09-09 16:47:38 +02:00
ionutboangiu
6e971e954c chore: remove unused call & redundant ping methods
- Ping methods defined by engine.NewService for all services
- Call methods were previously replaced by the centralized call method
(on *birpc.Service) for all components
- All services now register V1/V2 objects from apier package for
consistency
2024-09-06 17:37:05 +02:00
armirveliaj
35ae6ebd27 Add new unit tests on apier/v1 2024-09-05 20:47:27 +02:00
armirveliaj
0a0aec58b3 Add new unit tests on agents and apier/v1 2024-09-05 20:47:27 +02:00
armirveliaj
ddb25433f7 Add coverage tests on apier/v1 2024-09-05 20:47:27 +02:00
armirveliaj
ba558ea573 Add coverage tests on apier/v1 2024-09-05 20:47:27 +02:00
gezimblliku
ccc999642d added *fileLineNumber variable 2024-08-22 20:40:46 +02:00
gezimblliku
b7b931b8f6 added datamanager GetTrendProfiles method && api 2024-08-21 21:04:36 +02:00
armirveliaj
0a39796581 Add unit tests on apier/v1 2024-08-19 12:10:47 +02:00
gezimblliku
58e419b002 updated trend structure && model 2024-08-16 12:32:21 +02:00
gezimblliku
b1218c4ae3 added service for trends 2024-08-16 12:32:21 +02:00
gezimblliku
5b75bacff7 added trend with get,set and remove methods in datamanager 2024-08-14 14:03:21 +02:00
gezimblliku
22b96ca1e3 added tests for filter statmetric 2024-08-04 21:10:50 +02:00
ionutboangiu
63129feb4c prevent memprof file overwrites for small intervals
Previously, the timestamp was accurate only down to seconds. For smaller intervals,
this would truncate the previous file(s). Now, for small intervals, the number of
microseconds is appended to the file name.

Added the possibility to disable timestamps in the memory profile file names and use
increments of 1 instead.

Updated the memory profiling integration tests.
2024-08-02 09:35:36 +02:00
ionutboangiu
1c490a9020 Revise memory profiling implementation
- 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
2024-08-02 09:35:36 +02:00
gezimbll
85bd7a50e7 updated sags service name to ranking 2024-07-14 13:39:20 +02:00
gezimbll
4d4392d196 revised comments && renamed sars to trends 2024-07-14 13:39:20 +02:00
gezimbll
6c2fbbec28 added sars model,tp,api 2024-07-14 13:39:20 +02:00
gezimbll
777d4f0a28 added caching for sagprofile 2024-06-30 17:45:06 +02:00
gezimbll
0012477d52 added stat aggregator profile,models,tps and apis 2024-06-30 17:45:06 +02:00
ionutboangiu
49f6c5982e Add reference value functionality to *transfer_balance action
The *transfer_balance action can now use a reference value to ensure
the destination balance reaches a specified amount. If the destination
balance exceeds the reference value, the excess is transferred back
to the source balance. If the destination balance is below the
reference value, the required amount is transferred from the source
balance to the destination balance to reach the specified reference
value. An error is returned if the transfer cannot achieve the
specified reference value.

Used by specifying DestinationReferenceValue inside ExtraParameters.

Other *transfer_balance changes:
- used json tags when unmarshaling ExtraParameters in order to be
able to shorten the names of the fields
- lock the destination account only if it's different from the
source account. It is still passed to the Guard function but
without a lock key and with 0 timeout.
- if the transfer happens within the same account, update the
account and execute its ActionTriggers only once.
- moved transfer units validation after retrieving/creating the
destination balance

*cdrlog action has been updated to create cdrs for reference
*transfer_balance actions, although improvements are needed and
the functionality is not completely tested.

APIerSv1.TransferBalance has been updated to take into account the
ReferenceValue parameter.

Added new *transfer_balance action unit tests to account for the
new changes.

Added integration tests (incomplete for now, but functionality
has been tested manually).
2024-06-13 13:56:40 +02:00
arberkatellari
f46b37bdf8 Make minor improvements to sessions backup 2024-06-12 18:21:50 +02:00
arberkatellari
a0f94c6804 Add/Update unit and integration tests adjusting for sessions backup 2024-06-12 18:21:50 +02:00