0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-05-21 16:27:14 +00:00
Commit graph

33 commits

Author SHA1 Message Date
Emmanuel Vasilakis
73bb8888f3
Pause alert pushes to the cloud ()
* pause and unpause alert pushes to the cloud

* move the check to when creating opcode

* check for worker

* remove previous checks for dbsync_workers. queue and clean aclk_alert tables even if no workers are up. Get wc then check before setting pause

* remove sync_syncronize

* remove sync_synchronize_2
2022-05-12 15:52:26 +03:00
Vladimir Kobal
464695b410
Add chart filtering parameter to the allmetrics API query ()
* Add chart filtering in the allmetrics API call

* Fix compilation warnings

* Remove unnecessary function

* Update the documentation

* Apply suggestions from code review

* Check for filter instead of filter_string

* Do not check both - chart id and name for prometheus and shell formats

* Fix unit tests

Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
2022-05-05 19:32:57 +03:00
Emmanuel Vasilakis
d6b1756ea7
Reduce alert events sent to the cloud. ()
* filter

* update filter

* queue removed directly

* more

* logging

* cleanup

* cleanup 2

* cleanup 3

* finalize instead of reset
2022-05-02 18:36:56 +03:00
Stelios Fragkakis
5a944497d3
Improve ACLK sync logging ()
* Switch messages to ACLK RES, ACLK REQ, ACLK STA instead of OG, IN and just AC

* Lookup hostname by node id

* Record hostname when receiving an ACK for a chart sequence

* Additional log_access info

* Adjust log message when receing health log request

* Remove redundant ACK log message

* Remove duplicate log message

* Remove duplicate sql statements

* Rearrange variable definition for clarity

* Make sure node is a valid UUID (check return code)
2022-03-31 21:30:02 +03:00
Emmanuel Vasilakis
dcf9679b10
Don't send alert events without wc->host ()
* if wc->host is null dont send events

* we will always have wc->host

* free claim_id
2022-03-30 13:39:38 +03:00
Emmanuel Vasilakis
4b13dba445
Dont send a snapshot with snapshot id 0 () 2022-03-24 10:29:10 +02:00
Emmanuel Vasilakis
4f7d29eed5
Dont check host health enabled if host is null () 2022-03-14 14:17:40 +02:00
Emmanuel Vasilakis
026a875146
Replace write with read locks () 2022-03-10 15:29:34 +02:00
Timotej S
d8aba23d0f
Adds more info to aclk-state API call () 2022-03-09 14:08:20 +01:00
Emmanuel Vasilakis
d70cedbf90
Skip info field in protobuf alerts messages if it doesn't exist. ()
* dont assume info field exists

* add info field to documentation
2022-02-22 14:01:26 +02:00
Emmanuel Vasilakis
c5eb91bad1
Fix queue removed alerts ()
* delay queueing removed alerts

* parenthesis

* remove debug
2022-01-19 19:52:10 +02:00
Emmanuel Vasilakis
3296f78436
Add localhost hostname to the edit_command ()
* include localhost hostname in edit_command

* since the edit_command now contains the localhost name, dont pass it again to the script
2022-01-17 12:32:44 +02:00
Emmanuel Vasilakis
34c0bc93a2
Free claim_id () 2022-01-14 12:20:54 +02:00
Emmanuel Vasilakis
ad6992e968
Find host and pass health_enabled to cloud health log message () 2022-01-13 19:04:27 +02:00
Emmanuel Vasilakis
bf023b50fe
Try to find worker thread from parked ones () 2022-01-11 15:42:24 +02:00
Vladimir Kobal
3ba9dc6cf0
Fix compilation warnings () 2022-01-10 15:17:45 +02:00
Emmanuel Vasilakis
00b6b7ea49
set the enabled struct element to 1 () 2021-12-07 14:20:46 +02:00
Emmanuel Vasilakis
d13b918ad0
Δont use wc στρθψτ if it may not exist () 2021-11-22 20:58:05 +02:00
Stelios Fragkakis
454387fcf4
Cleanup compilation warnings ()
* Fix compilation warnings (variables used when debugging is enabled using NETDATA_INTERNAL_CHECKS)
* Fix compilation warning (casting)
2021-11-19 22:12:29 +02:00
Stelios Fragkakis
11b8588c94
Fix coverity issues ()
* Add check for NULL wc->host

* Use sqlite3_exec, if it fails it will be retried on the next health log entries rotation
2021-11-19 16:56:51 +02:00
Emmanuel Vasilakis
14507c9597
Always queue alerts to aclk_alert ()
* always queue to aclk_alert

* proper function name
2021-11-18 20:14:31 +02:00
Emmanuel Vasilakis
dc42e45c6a
Add some logging for cloud new architecture to access.log ()
* add some logging for ng arch to access.log

* change arrows to IN, OG, AC

* log also the params for aclk requests

* check for wc->host before using wc->host->hostname

* turn two messages to info

* reduce alert event logs

* used thread local variables
2021-11-18 11:56:49 +02:00
Emmanuel Vasilakis
9676eff1bc
insert into aclk_alert instead of queuing () 2021-11-11 15:06:04 +02:00
Stelios Fragkakis
a6219dcbbd
Fix host hop count reported to the cloud ()
* Fix hop count

* Remove the warning message
2021-11-10 15:26:35 +02:00
Stelios Fragkakis
e9efad18e8
Improve the ACLK sync process for the new cloud architecture ()
* Move retention code to the charts

* Log information about node registration and updates

* Prevent deadlock if aclk_database_enq_cmd locks for a node

* Improve message (indicate that it comes from alerts). This will be improved in a followup PR

* Disable parts that can't be used if the new cloud env is not available

* Set dimension FLAG if message has been queued

* Queue messages using the correct protocol enabled

* Cleanup unused functions
Rename functions that queue charts and dimensions
Improve the generic chart payload add function
Add a counter for pending charts/dimension payloads to avoid polling the db
Delay the retention update message until we are done with the updates
Fix full resync command to handle sequence_id = 0 correctly
Disable functions not needed when the new cloud env functionality is not compiled

* Add chart_payload count and retry count
Output information or error message if we fail to queue chart/dimension PUSH commands
Only try to queue commands if we have chart_payload_count>0
Remove the event loop shutdown opcode handle

* Improve detection of shutdown (check netdata_exit)

* Adjusting info messages
2021-11-03 19:18:35 +02:00
Emmanuel Vasilakis
08f8695a5b
Move initial snapshot_proto generation inside the loop () 2021-11-01 08:58:38 +02:00
Emmanuel Vasilakis
eefa40cb54
Queue removed alerts to cloud for new architecture ()
* rebased

* add error message

* make function void

* fix return
2021-10-25 16:39:24 +03:00
Emmanuel Vasilakis
a97f06a6eb
Fix coverity issues 373612 & 373611 ()
* fix 2 coverity errors

* remove call to sql_queue_removed_alerts_to_aclk from health
2021-10-22 15:44:21 +03:00
Emmanuel Vasilakis
0882ed03b4
Add snapshot message and calls to sql_queue_removed_alerts_to_aclk () 2021-10-19 11:30:10 +03:00
Emmanuel Vasilakis
882bc018f3
Fix build issue related to legacy aclk and new arch code ()
* add idefs to protect regions of alerts code

* remove check
2021-10-14 15:22:19 +03:00
Stelios Fragkakis
12f16063f5
Enable additional functionality for the new cloud architecture () 2021-10-06 20:55:31 +03:00
Timotej S
dad48421a6
Makes New Cloud architecture optional for ACLK-NG ()
ACLK-NG supports both new and old cloud protocol. Protobuf and C++ compiler are required only for new cloud protocol.
There is no reason to skip building whole ACLK-NG when protobuf is missing.
2021-09-29 17:53:53 +02:00
Emmanuel Vasilakis
4ae3199311
Add alert message support for ACLK new architecture ()
* add alert messages

* also clear date_cloud_ack

* move buffer_create

* remove include file

* use wc->node_id
2021-09-23 17:34:34 +03:00