0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-17 11:12:42 +00:00
Commit graph

72 commits

Author SHA1 Message Date
thiagoftsm
325857ef07 Common pattern for web and alarms together with two bug fixes ()
* script_pattern: Fix script and bring pattern

This commit fixes the error given by shellckeck on stress.sh and brings a pattern for the other scripts, no
less important its given the possibility to change the url from outside of the scripts

* script_pattern: shellcheke

Correct the request.sh after to change it to avoid warning errors from shellchecker

* script_pattern: Remove of garbage value

With this PR I am removing the garbage value of a script

* script_pattern: Restore color

These 3 scripts changed in this commit was not restoring the terminal color,
this commit fixes this
2019-09-29 11:10:35 +02:00
thiagoftsm
e3471fa572 Create a template for all dimensions ()
* health_connection: Comments inside Health Config

To try to understand better what is necessary to change and where it is necessary
to change anything inside the health, I commented the functions inside this file"
"

* health_connection: Comments about Health in other files

This commit brings the rest of the comments that were missed for health"

* health_connection: Comments on health_log

I had to append more comments on health_log

* health_connection: Create a new variable

New variable is created to work with foreach

* health_connection:  Fix new option and doc

The first implementation of the 'foreach' had a problem, this fixes the error.
This commit also brings the updates for the documentation

* health_connection:  Understanding health

This commit is to save the place that I am working, it has the map to understand all the alam process

* health_connection:  Update map

I changed the position of the error message to identify the correct place to add new alarms

* health_connection: End of simple alarm

This commit finishes what is necessary to bring the same lookup for different dimensions  in one unique line

* health_connection:  Documentation and template steps

This commit brings the documentation missed for template and comments to help in the next
step of apply a template to create an alarm.

* health_connection: Restoring

After some tests, it was detected that the alarms were not working as expected

* health_connection: Fix bug and bring dimension to template

This commit brings a fix for an old Netdata bug, before this the Netdata always tried to create
a new entry in an index with the same id raising an error.
It also brings the possibility to use 'foreach' in  template

* health_connection: Fix cmake compilation

There was a problem with cmake compilation fixed by this commit

* health_connection: shell script

Finilize the shell script to test the PR

* health_connection: Remove debug message

During the development, I used some messages to understand the code
this commit removes the last message

* health_connection: Fix bugs

This commits fix bugs reported by tests

* health_connection: Alarm working

This commit brings the necessary change for the alarms work, but it is missing the unlink from the newest list

* health_connection: Template code written

This commit finishes the creation of alarm from template, but it was not tested yet.

* health_connection: Remove comments

I am removing the comments from this PR to bring back late

* health_connection: Remove lines

Another commit to restore the files before they to be commented

* health_connection: New alarm and remove messages

I am bringing a new alarm to test template with SP and removing comments used during the development

* health_connection: Functional test review

After to review the functional test script, it was necessary to small adjust to
test all the features available with the new version

* health_connection: Free structure

I am moving the free list for the correct place, the previous place was not safe

* health_connection: ShellCheck

This commit fixes the problems with shellcheck

* health_connection: FIx hash

This commit fix the hash calculation that was using wrong input

* health_connection: Fix message error

The system was showing a wronge message, because when we have foreach
the alarm created with templated is added in a second stage to the index

* health_connection: Fix documentation

In this commit I am fixing the grammar of the previous doc and bringing
two examples

* health_connection: Fix examples

This commit fix the last two examples that was brought in this PR

* health_connection: Fix example doc

When I brought the correct grammar in the last commit, I lost a mark

* health_connection: Grammar fix

Fixing grammar of the documentation

* health_connection: Memory leak

This commit fixes the memory leak that was present in the PR

* health_connection: Reload

This commit fix the problem that the alarms were not linked after
to receive a SIGUSR2

* health_connection: False Positive from codacy

Codacy was given a false positive, I changed the function to avoid it.

* health_connection: dead code

Remove dead code from the code.

* health_connection: Memory Leak

Remove memory leak when clean simple pattern

* health_connection: Script format

With this commit I am formatting the last message to return
for the default color on terminal

* health_connection: Script format 2

With this commit I am formatting the last message to return
for the default color on terminal

* health_connection: Script format 3

With this commit I am formatting the error message to return
for the default color on terminal
2019-09-27 14:24:54 +02:00
Timo
fbbb85332d check for curl to not get wrong error message () 2019-09-25 11:58:51 +02:00
Andrew Clayton
d6ba820be6 Cppcheck fixes ()
* collector: cgroups: Fix a cppcheck warning

Cppcheck was throwing the following warning in
collectors/cgroups.plugin/cgroup-network.c

[collectors/cgroups.plugin/cgroup-network.c:233]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?

One of the arguments to switch_namespace() is 'const char *prefix', in
this function we were checking if prefix was NULL and if so setting it
(local scope wise) to "".

While this wasn't technically incorrect in this context. It is also
unnecessary as the prefix variable is only passed to the proc_pid_fd()
function where the same check happens, so we can simply remove the
offending line.

Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net>

* tests/profile: Remove somewhat redundant code

cppcheck was throwing a warning in benchmark-line-parsing.c

[tests/profile/benchmark-line-parsing.c:648]: (warning) Unnecessary
comparison of static strings, this comes from

    (void)strcmp("1", "2");

in main()

That is amongst a group of three function calls preceded by the comment

    // cache functions

But then test1() which uses strcmp() is called twice anyway with the
timing result of just the second one used, so the dummy strcmp() call
would seem superfluous.

I would say the same is true for the call to strtoull()

    (void)strtoull("123", NULL, 0);

as that is also used in test1().

I actually ran this benchmark with and without the calls to all three
functions, i.e

    // cache functions
    (void)simple_hash2("hello world");
    (void)strcmp("1", "2");
    (void)strtoull("123", NULL, 0);

With the above functions being called

test1() average time = 7801604
test2() average time = 1333162

Without those three function calls

test1() average time = 7779905
test2() average time = 1321438

Those are the averages of three runs. test1() uses strcmp() & strtoull()
and test2() uses simple_hash2(), so in that run, not calling the three
functions initially was actually quicker.

Subsequent runs of each show similar numbers with each edging the other
out, however the difference is in the noise.

Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net>
2019-09-17 13:42:55 +02:00
thiagoftsm
0798426c7d
Fix clear notification missing ()
* alarm_clear: Mapping

In this PR I mapped all the necessary steps to discover the solution for the ISSUE 6581

* alarm_clear: Documentation and fixes

This commit fixes the problem that were present in Netdata and it also updates
the documentation of the functions and Netdata.

* alarm_clear: shell script

The original implementation did not have a shell script, here I begin to fix this

* alarm_clear: shell script

It is necessay to verify why make is not producing the same binary than cmake and finish the changes in the script

* alarm_clear: adjust in health.c

I rewrote the health.c to be more readable, but I discovered the problem I had in the last few hours
were due kernel update

* alarm_clear: script changes

In this commit I am bringing the final version of the script that
test the alarm repetition

* alarm_clear: script fix and remove comments

IN this commit I am fixing the shellcheck errors and removing some debug messages
that were present in the code while I was developing

* alarm_clear: Format

The health.c had wrong tabulation, this PR brings back the pattern of space as tab for this file

* alarm_clear: Script

The script was using killlall that is not more present in all Linux distribution
this commit removes this and bring the new way to stop Netdata

* alarm_clear: return to previous tabulation

I am bringing back the old tabulation here and I will create a new PR
exclusively for this

* alarm_clear: Remove comments

I am removing comments from this PR to keep the focus in the major problem

* alarm_clear: Remove comments 2

I forgot one comment

* alarm_clear: New variable

I am appending a new variable in the check before the rebase, because the health.c changed in other file
has a direct relationship with what I did here until now

* alarm_clear: Fix clear repetition

With this last commit, I am bringing a new way to raise the clear alarm, but it is not repeating more
with this fix, it displayed one time when it is cleaned and it will display the message again, if and only if,
the alarm was raised.
2019-09-03 18:30:26 +00:00
thiagoftsm
b11764f165 fix_compilation_test: Eliminate git messages ()
When it was the merge of different PRs related to web server, there was a garbage in the Makefile
this PR removes this garbage
2019-08-15 13:34:52 +02:00
Promise Akpan
f5006d51e8 Fix Markdown Lint warnings ()
* make remark access all directories

* detailed fix after autofix by remark lint

* cross check autofix for this set of files

* crosscheck more files

* crosschecking and small fixes

* crosscheck autofixed md files
2019-08-15 13:06:39 +02:00
Paul Emm. Katsoulakis
4853126302
netdata/packaging: Bare OS validations ()
* netdata/packaging: complete the list of bare OS validations, to be extra sure all cases are covered

* netdata/packaging: centos 6 has a different release file

* netdata/ci: [ci skip] no centos 8 yet

* netdata/ci: [ci skip] dont run for Debian 7 - its dead

* trigger travis

* netdata/ci: remove Debian 8 as bats not available with the standard repos - we will revisit our strategy on how we execute tests anyway
2019-08-09 17:48:47 +03:00
thiagoftsm
2db6d758f8 Fix crash in malloc ()
* Server Crashing: URL search path

The system was setting NULL in an address without to have the values

* Server Crashing: URL script

After to fix the SSL, the script were not 100% compatible, so I am bringing the solution here

* Server Crashing:

Fixes reported in the issue related a possible NULL value to be kept and wrong variable

* Server Crashing: Readable code and missing if

It was a missing if yet, so I changed it, no less important I inverted the check order inside if to be more readable
2019-08-01 18:05:31 +03:00
thiagoftsm
2f7962c9e1 Fix parsing SSL ACL along with others ()
* sslstream: ACL parser

It was noticed in the issue 6457 that the some ACLs were not parsing
correctly when they were along SSL acl, this commit fixes this'

* sslstream: remove comments

This commit removes the comments that were present while I was testing the code

* sslstream: Tests

This commit adds ACL tests to check the Netdata response to them

* sslstream: Tests

Fix the extension to upload the files

* sslstream: more tests

In this commit I am bringing more tests, including the ssl tests'

* sslstream: leading space

Remove leading space from variable that was creating problem with shellcheck

* sslstream: glob

Remove special character from script

* sslstream: Makefile

The Makefile diretives were pointed to wrong files

* sslstream: Missing stream encrypt

This commit solves the problem of the stream not be encrypted, but
it is not the final solution, because the parser made is incomplete.

* sslstream: Finish encrypt channel

This commit brings the step that I was missing, the complete encryptation
in the communication between Master and Slave

* sslstream: Fix argument in script

After the latest tests, it was verified that two arguments given to a function
inside the script were not correct, with this PR I am fixing this!

* sslstream: Fix argument in info

Instead to call a function to deliver an integer I was passing a size_t value.
Only cmake showed this, but not in my clion! :/

* sslstream: Fix redirect

When we were having different SSL configuration, the system were not applying
the option for all

* sslstream: Update documentation

Our documentation was not clear about the rules according our code
so I am updating the text to explain for the users

* sslstream: Adjust script

With this last commit, I am adjusting the tests to avoid false positive

* sslstream: Missing elif

The previous commit had a missing elif in the shell script

* sslstream: Split ports

Before this commit Netdata was having SSL as a global option, now it has as a real ACL.

* sslstream: reduce context

The stream variable will not be affected in the master side, it is only necessary
on the slave side, so I am reducing the context of it

* sslstream: Force SSL

When the user has certificate and he does not set any SSL flag, it is necessary
to append the SSL=force flag

* sslstream: Default flag

It is necessary to have a default flag when the SSL flags are not SET

* sslstream: remove comments

Remove comments from the scrip

* sslstream: moving flag

It is better the flag to be set inside socket instead everytime there is a new connection

* sslstream: documentation

Fix a sentence in the web/server/README.md
2019-07-25 18:43:04 +02:00
thiagoftsm
3076cfe5d4
Url parser refactoring ()
* URL_parser_review comments 1

* URL_parser_review restoring web_client.c

* URL_parser_review restoring url.h

* URL_parser_review restoring web_client.h

* URL_parser_review restoring inlined.h

* URL_parser_review restoring various

* URL_parser_review commenting!

* URL_parser_review last checks!

* URL_parser_review registry!

* URL_parser_review codacy errors!

* URL_parser_review codacy errors 2!

* URL_parser_review end of request!

* URL_parser_review

* URL_parser_review format fix

* URL_parser_review restoring

* URL_parser_review stopped at 5!

* URL_parser_review formatting!

* URL_parser_review:

Started the map of the query string when it is necessary

* URL_parser_review:

With these adjusts in the URL library we are now able to parser all the escape characters!

* URL_parser_review: code review

Fixes problems and format asked by coworkers!

* URL_parser_review: adjust script

The script was not 100% according the shellcheck specifications, no less important
it was a direct script instead a .in file

* sslstream: Rebase 2

It was necessary to change a function due the UTF-8

* sslstream: Fixing 6426

We had a cast error introduced by other PR, so I am fixing here

* URL_parser_review

Change .gitignore to avoid considering a script file.
2019-07-25 12:30:00 +00:00
thiagoftsm
c56e086ba3 Easily disable alarms, by persisting the silencers configuration ()
This PR was created to fix , here I am completing the job initiated by Christopher, among the newest features that we are bring we have

JSON inside the core - We are bringing to the core the capacity to work with JSON files, this is available either using the JSON-C library case it is present in the system or using JSMN library that was incorporated to our core. The preference is to have JSON-C, because it is a more complete library, but case the user does not have the library installed we are keeping the JSMN for we do not lose the feature.
Health LIST - We are bringing more one command to the Health API, now with the LIST it is possible to get in JSON format the alarms active with Netdata.
Health reorganized - Previously we had duplicated code in different files, this PR is fixing this (Thanks @cakrit !), the Health is now better organized.
Removing memory leak - The first implementation of the json.c was creating SILENCERS without to link it in anywhere. Now it has been linked properly.
Script updated - We are bringing some changes to the script that tests the Health.
This PR also fixes the race condition created by the previous new position of the SILENCERS creation, I had to move it to daemon/main.c, because after various tests, it was confirmed that the error could happen in different parts of the code, case it was not initialized before the threads starts.

Component Name
health directory
health-cmd

Additional Information
Fixes  and 
2019-07-01 21:07:21 +02:00
Pavlos Emm. Katsoulakis
171d8f5d01 Revert "Easily disable alarms, by persisting the silencers configuration ()"
This reverts commit 60a73e90de.

Emergency rollback of potential culprit as per issue 
Will be re-merging the change after investigation
2019-06-28 08:27:57 +02:00
thiagoftsm
60a73e90de Easily disable alarms, by persisting the silencers configuration ()
* Alarms begin!

* Alarms web interface comments!

* Alarms web interface comments 2!

* Alarms bringing Christopher work!

* Alarms bringing Christopher work!

* Alarms commenting code that will be rewritten!

* Alarms json-c begin!

* Alarms json-c end!

* Alarms missed script!

* Alarms fix json-c parser and change script to test LIST!

* Alarms fix test script!

* Alarms documentation!

* Alarms script step 1!

* Alarms fix script!

* Alarms fix testing script and code!

* Alarms missing arguments to pkg_check_modules

* SSL_backend indentation!

* Alarms, description in Makefile

* Alarms missing extern!

* Alarms compilation!

* Alarms libnetdata/health!

* Alarms fill library!

* Alarms fill CMakeList!

* Alarm fix version!

* Alarm remove readme!

* Alarm fix readme version!
2019-06-27 13:16:28 +02:00
Paul Emm. Katsoulakis
08b0212bf9
netdata/packaging: Add option for slack messages to be pushed on alternative channel, than the default. Push all info to #automation, make #ci-status error reporting only ()
I 'll be monitoring closely the change - it is related to our CI and does not directly affect our customers
2019-06-12 11:11:53 +03:00
Paul Emm. Katsoulakis
08666d9023
netdata/packaging: Add more distribution validations ()
* netdata/packaging: Add more distribution validations
As an attempt to increase our coverage in testing and to guarantee cross-distribution stability,
we choose to extend our baseline tests across all currently supported distributions.
We run the stable to current transition test, to maximize scenarios coverage.

The missing distributions from the bare OS runs, are covered on the Artifacts validations stage

* netdata/packaging: adjust update lifecycle test to be more agile
1) use required packages during setup, to guarantee all stuff there cross-distro
2) add opensuse on entry point script
3) Only bats and curl will be installed prior to the tests. The rest are from the deps script

* netdata/packaging: Use the right id for version checking,
its opensuse-leap not opensuse

* netdata/packaging: small adjustments
1) move deps script outside the bats process
2) don't install curl, we expect it to be there
3) fix tumbleweed tag, it was wrong (duh)

* netdata/packaging: wrong place, trigger depedency after curl and bats install. Also, blind install for weird archlinux case missing grep

* netdata/packaging: missed one more OS identifier

* netdata/packaging: Handle alpine case

* netdata/packaging: unattended execution flags

* netdata/packaging: its a never ending story.. early install of bash for alpine, to get our job done then

* netdata/packaging: fix docker runs - multiple commands should be within the container, just using && doesn't send them to the container, second command rather runs on the host

* netdata/packaging: Run sh for the main test script, then trigger bash install within for alpine so that the rest of the process runs smoothly
2019-06-09 20:28:34 +03:00
Pavlos Emm. Katsoulakis
0fca36fd59 Revert "New URL parser ()"
This reverts commit 58b7d95a7e.
---
As agreed with @thiago and @cakrit we revert URL parser changes,
to buy the time on a more detailed investigation
---
2019-06-07 18:14:44 +03:00
thiagoftsm
58b7d95a7e
New URL parser ()
* URL_parser 3

* URL_parser rebase 2!

* URL_parameter parsing 3

* URL_parameter parsing 4

* URL_parameter parsing 5

* URL_parser alarms

* URL_parser finish the basic structure

* URL_parser codacity fixes!

* URL_parser scripts!

* URL_parser codacy!

* URL_parser rebase 3!

* URL_parser host fixes!

* URL_parser host fixes 2!

* URL_parser fix spaces!

* URL_parser error message!

* URL_parser Christopher requests!

* URL_parser alarms fixed!

* URL_parser health fixed!

* URL_parser rebase 4!

* URL_parser C fix write format!

* URL_parser fix bugs due cache!
2019-06-06 17:01:39 +00:00
Paul Emm. Katsoulakis
74952493fb
netdata/packaging/ci: Add lifecycle checks to bare operating system installations ()
* Introduce more tests on bare OS, to block possible dependency issues in the code
* Move bare OS tests on their own stage, to get direct visibility upon possible dependency issues
* Limit bare OS runs on pull requests and cron, to avoid messing with people's development runs. We can catch dependency or peculiar build issues during PRs
* Rushed it, we now running on different distros, adjust the repository clean up
* Centos7 adds quotes on the ID, lets strip them out
* Still, you need to add the required packages for testing on debian/ubuntu
* curl also required
* We 'll be using 16.04 as default distro, not 14.04
* Add an irrelevant shellcheck error, probably raised depending on bash version as we didnt have it with 14.04
* The job needs to run as root, add sudo
2019-06-04 17:16:07 +03:00
Chris Akritidis
fd976d40e2
Simplify health cmdapi tester - no setup/cleanup needed () 2019-06-04 11:51:42 +02:00
Chris Akritidis
880da6db0e
Add more metrics to the tests () 2019-05-22 09:23:43 +02:00
Pavlos Emm. Katsoulakis
c1b54fa6d2 netdata/packaging/ci: Make slack lib fail loud when parameters are broken 2019-05-19 15:57:45 +03:00
Pavlos Emm. Katsoulakis
d5ffdf49f4 netdata/packaging/ci: Fix slack integration 2019-05-19 15:30:05 +03:00
Chris Akritidis
278f062dc1
Initial script for API load testing ()
* Initial script for API load testing

* Test only example chart

* Saner tests

* Add comments
2019-05-16 15:15:51 +02:00
Paul Emm. Katsoulakis
d01b2620ea
Fix lifecycle script ()
* netdata/packaging/ci: stronger validations during install, add some comments, change validation of CWD

* netdata/packaging/ci: Add a lifecycle test to validate update from stable to latest works smooth

-> Add updater BATS script that does the trick for installing stable then migrating to latest using current code and not nightly
-> Integrate with travis
-> Rename /code to /netdata in travis, scripts will eventually expect the TLD of repo to be actually named netdata, so test will start failing later
-> Introduce a flag on the updater, so that it doesn't download the tarball, but it rather works with a local pre-defined directory. If a user wants
   to override the update process, so that it runs with a different repository he just needs to export NETDATA_LOCAL_TARBAL_OVERRIDE with the desired repo directory

* netdata/packaging/ci: Add required packages for it to run
2019-04-29 18:39:22 +03:00
Paul Emm. Katsoulakis
a8ba6234f6
Pipeline redesign master ()
* netdata/packaging/ci: [WIP] Redesign packaging release

* netdata/packaging/ci: Add explicitly os definition, also remove sourcing of slack, its already done and rename before_install -> install

* netdata/packaging/ci: fix stray stage name

* netdata/packaging/ci: style

* netdata/packaging/ci: fix syntax for yaml

* netdata/packaging/ci: Try removing this, doesnt seem to make much sense to be there (for now)

* Revert "netdata/packaging/ci: Try removing this, doesnt seem to make much sense to be there (for now)"

This reverts commit ad5556a3ccf6c11ebc9026942af8013d4d0ea666.
wow travis - this is weird

* netdata/packaging/ci: a few more changes

* netdata/packaging/ci: This is totally experimental, will adjust after i test it

* netdata/packaging/ci: Reinstate original design - the problem i am trying to solve is more travis-related and fundamental on the way travis works

* netdata/packaging/ci: i wonder..

* Revert "netdata/packaging/ci: i wonder.."

This reverts commit a160df4fcac866375e8319bf200f47263b2bcaa3.

* netdata/packaging/ci: Fix broken items

* netdata/packaging/ci: docker images are built and published independently. As long as tagging has taken place earlier, during packaging

* netdata/packaging/ci: Following hints from https://github.com/travis-ci/travis-ci/issues/4681 and the mayhem triggered from this change
So we adding the compiler, to see if it will get travis to build the right matrix.
then linter broke on addons for some weird reason, so remove addons->apt->update too

* netdata/packaging/ci: Now do the rest of the changes, since with addition of compiler, things got worse

* netdata/packaging/ci: Ok, as expected the workaround from them did not work. Lets get creative though and assume they exclude what they added, so lets do that for os

* netdata/packaging/ci: test slack

* netdata/packaging/ci: Bring the modified slack script on this branch

* netdata/packaging/ci: Add a few more slack messages

* Fix empty stage occurrence

* netdata/packaging/ci: Another set of restructure changes, explained below

1) Publish release -> Publish for release (minor rename for clarity)
2) Add some more work on the make dist testing (temp folder for root and for now just validate the existence of the tarball)
3) Add some more slack notifications (that is still beta, will have to properly refine once we are done with changes of the flow)
4) Restructure the release process, finally
   a) relase.sh becomes draft_release.sh and changelog_and_tag_release.sh, basically splitting up the steps into meaningful independent blocks
   b) Adjust the pipeline, now we run 'changelog_and_tag_release.sh' to get the latest changelog and tag the release,
      then we run artifacts submission and draft release generation on github
   still more things to re-check on this step, it will become clearer once i get it up to speed to run on my local repos end to end

* netdata/packaging/ci: Fix wrong path usage

* netdata/packaging/ci: Update webhook URL

* netdata/packaging/ci: Update stage config as proposed by the fix from travis team

* netdata/packaging/ci: Another round of restructuring, after 1-1 comparison with old version

Briefly:
1) Publish for release stage will only run when there is a TAG defined (To be tested though, but thats the idea).
   The code previously had the releaser.sh script that did exactly that, if tagger script failed, it would stop process.
   Now we have distributed the processing in clear chunks and we pick up the process based on shared info that travis or the environment provides

2) Rename <<Create release (only on special commit msg)>> to a more appropriate name, we are not really creating release there its more complicated

3) Move the labeler execution to the packaging step, since publishing now not happening all the time. Previously we hacked this by exit 0 with the tagger
   and allow the labeler (which was the second part of the execution) to run.

4) before_install in the publishing stage is wrong. We only need this as before_deploy before deploy execution. That is where we use it, really.

5) Rename changelog_and_tag_release.sh to generate_changelog_and_tag_release.sh, just to be clearer. No problem with slightly longer file names

6) Do not let generate_changelog_and_tag_release.sh execute if GIT_TAG is not defined, just exit quietly with a message and a success code

7) Remove the tagger from the generate_changelog_and_tag_release.sh, its confusing to shove it in there. Pull it out and let it run on a clear step from the pipeline but within the same machine to make sure it shares environment with generate_changelog_and_tag_release.sh (So it has to be within the same job)

This is it mostly, keep in mind that the nightly and release parts are not tested yet.
After this commit, there will be more code that will allow me to execute all the flows on my pipeline and fully test and adjust the workflows as needed

* netdata/packaging/ci: Add more notifications, adjust the existing ones too

* netdata/packaging/ci: Add safeguards for beta, do a rename too

1) rename generate_changelog.sh -> generate_changelog_for_nightlies.sh, just to provide clarity on the usage.
   Note: we will simplify this later, this was a workaround that raised a bug on release after refactoring nightlies.
   We will have to clean this up properly once we merge the new pipeline flow

2) Add checks based on TRAVIS_REPO_SLUG to identify when we running on personal repo and abort mission critical actions like deploying or generating changelogs
   Note: The deployment step for now will simply fail, due to the lack of the necessary encryption keys on the environment.
   At a later iteration, we should have beta buckets on GCS and also beta repositories on Docker to properly test our publishing capability on our beta stack

* netdata/packaging/ci: Refactor README.md -- still half way there, will resume when i am done with testing

* netdata/packaging/ci: At this stage make the scripts harder to run, add checks to bypass tested execution.

* netdata/packaging/ci: Seems that adding the install tag within the stage, kind of overriding the outer install

pull out install items from packaging to the main install, no point to isolate two packages, just install all required all the time

* netdata/packaging/ci: tag obviously cant work at that step, moving it down to the jobs and i need to recheck if the syntax is applicable for travis too

* netdata/packaging/ci: So the jobs in a list dont share the environment, lets see if we do it otherwise. also remove the tag check, not work as expected

* netdata/packaging/ci: Add another way to check the RC condition

* netdata/packaging/ci: experimental - check conditions on message

* netdata/packaging/ci: Introduce an alternate master branch for the workflow testing
1. I created pipeline-redesign-master that will be the master branch for my use cases
2. Modified travis to trigger all production workflows on that branch, so that i can experiment freely with test commits to trigger process and verify execution flow

* remove spaces

* netdata/packaging/ci: comment out

* netdata/packaging/ci: wording nit

* netdata/packaging/ci: adjust the condition properly

* netdata/packaging/ci: test condition for triggering on specific keywords

* netdata/packaging/ci: try  different syntax

* netdata/packaging/ci: remove depth, causes problems as we dont get all required objects from repo (adds --depth 50 in clone)

* Missing equal sign in regex?

* netdata/packaging/ci: Update tagger script
1) More verbose messages
2) Update comments copyrights etc
3) Rename release_candidate to set_tag_release_candidate
4) Add curlies on the variables, also change the way we check for path

* netdata/packaging/ci: reinstate git depth

* netdata/packaging/ci: Remove git depth from packaging too

* netdata/packaging/ci: RTFM - was using wrong syntax for slack @here approach

* netdata/packaging/ci: Using install tag at the stage layer, overrides the global one for some reason. fix that

* netdata/packaging/ci: Dont use the pattern matching from travis, do it outside with a script

* netdata/packaging/ci: Do it the other way, script execution doesnt work there

* netdata/packaging/ci: Attempt to fix conditional on release, remove the faulty assumptions as provided by travis team

* netdata/packaging/ci: reintroduce the tag checking

* netdata/packaging/ci: you need to bring tag checking at the stage, as it is calculated during packaging step

* netdata/packaging/ci: you cant escape that one for the moment, merge them and we will rework it later again

* netdata/packaging/ci: dont forget git depth

* netdata/packaging/ci: [WIP] Redesign packaging release

* netdata/packaging/ci: Add explicitly os definition, also remove sourcing of slack, its already done and rename before_install -> install

* netdata/packaging/ci: fix stray stage name

* netdata/packaging/ci: Try removing this, doesnt seem to make much sense to be there (for now)

* Revert "netdata/packaging/ci: Try removing this, doesnt seem to make much sense to be there (for now)"


* netdata/packaging/ci: Reinstate original design - the problem i am trying to solve is more travis-related and fundamental on the way travis works

* netdata/packaging/ci: Fix broken items

* netdata/packaging/ci: docker images are built and published independently. As long as tagging has taken place earlier, during packaging

* netdata/packaging/ci: Following hints from https://github.com/travis-ci/travis-ci/issues/4681 and the mayhem triggered from this change
So we adding the compiler, to see if it will get travis to build the right matrix.
then linter broke on addons for some weird reason, so remove addons->apt->update too

* netdata/packaging/ci: Now do the rest of the changes, since with addition of compiler, things got worse

* netdata/packaging/ci: Ok, as expected the workaround from them did not work. Lets get creative though and assume they exclude what they added, so lets do that for os

* netdata/packaging/ci: test slack

* netdata/packaging/ci: Bring the modified slack script on this branch

* netdata/packaging/ci: Add a few more slack messages

* Fix empty stage occurrence

* netdata/packaging/ci: Another set of restructure changes, explained below

1) Publish release -> Publish for release (minor rename for clarity)
2) Add some more work on the make dist testing (temp folder for root and for now just validate the existence of the tarball)
3) Add some more slack notifications (that is still beta, will have to properly refine once we are done with changes of the flow)
4) Restructure the release process, finally
   a) relase.sh becomes draft_release.sh and changelog_and_tag_release.sh, basically splitting up the steps into meaningful independent blocks
   b) Adjust the pipeline, now we run 'changelog_and_tag_release.sh' to get the latest changelog and tag the release,
      then we run artifacts submission and draft release generation on github
   still more things to re-check on this step, it will become clearer once i get it up to speed to run on my local repos end to end

* netdata/packaging/ci: Fix wrong path usage

* netdata/packaging/ci: Update webhook URL

* netdata/packaging/ci: Update stage config as proposed by the fix from travis team

* netdata/packaging/ci: Another round of restructuring, after 1-1 comparison with old version

Briefly:
1) Publish for release stage will only run when there is a TAG defined (To be tested though, but thats the idea).
   The code previously had the releaser.sh script that did exactly that, if tagger script failed, it would stop process.
   Now we have distributed the processing in clear chunks and we pick up the process based on shared info that travis or the environment provides

2) Rename <<Create release (only on special commit msg)>> to a more appropriate name, we are not really creating release there its more complicated

3) Move the labeler execution to the packaging step, since publishing now not happening all the time. Previously we hacked this by exit 0 with the tagger
   and allow the labeler (which was the second part of the execution) to run.

4) before_install in the publishing stage is wrong. We only need this as before_deploy before deploy execution. That is where we use it, really.

5) Rename changelog_and_tag_release.sh to generate_changelog_and_tag_release.sh, just to be clearer. No problem with slightly longer file names

6) Do not let generate_changelog_and_tag_release.sh execute if GIT_TAG is not defined, just exit quietly with a message and a success code

7) Remove the tagger from the generate_changelog_and_tag_release.sh, its confusing to shove it in there. Pull it out and let it run on a clear step from the pipeline but within the same machine to make sure it shares environment with generate_changelog_and_tag_release.sh (So it has to be within the same job)

This is it mostly, keep in mind that the nightly and release parts are not tested yet.
After this commit, there will be more code that will allow me to execute all the flows on my pipeline and fully test and adjust the workflows as needed

* netdata/packaging/ci: Add more notifications, adjust the existing ones too

* netdata/packaging/ci: Add safeguards for beta, do a rename too

1) rename generate_changelog.sh -> generate_changelog_for_nightlies.sh, just to provide clarity on the usage.
   Note: we will simplify this later, this was a workaround that raised a bug on release after refactoring nightlies.
   We will have to clean this up properly once we merge the new pipeline flow

2) Add checks based on TRAVIS_REPO_SLUG to identify when we running on personal repo and abort mission critical actions like deploying or generating changelogs
   Note: The deployment step for now will simply fail, due to the lack of the necessary encryption keys on the environment.
   At a later iteration, we should have beta buckets on GCS and also beta repositories on Docker to properly test our publishing capability on our beta stack

* netdata/packaging/ci: Refactor README.md -- still half way there, will resume when i am done with testing

* netdata/packaging/ci: At this stage make the scripts harder to run, add checks to bypass tested execution.

* netdata/packaging/ci: Seems that adding the install tag within the stage, kind of overriding the outer install

pull out install items from packaging to the main install, no point to isolate two packages, just install all required all the time

* netdata/packaging/ci: tag obviously cant work at that step, moving it down to the jobs and i need to recheck if the syntax is applicable for travis too

* netdata/packaging/ci: So the jobs in a list dont share the environment, lets see if we do it otherwise. also remove the tag check, not work as expected

* netdata/packaging/ci: Add another way to check the RC condition

* netdata/packaging/ci: experimental - check conditions on message

* netdata/packaging/ci: Introduce an alternate master branch for the workflow testing
1. I created pipeline-redesign-master that will be the master branch for my use cases
2. Modified travis to trigger all production workflows on that branch, so that i can experiment freely with test commits to trigger process and verify execution flow

* remove spaces

* netdata/packaging/ci: comment out

* netdata/packaging/ci: wording nit

* netdata/packaging/ci: adjust the condition properly

* netdata/packaging/ci: test condition for triggering on specific keywords

* netdata/packaging/ci: try  different syntax

* netdata/packaging/ci: remove depth, causes problems as we dont get all required objects from repo (adds --depth 50 in clone)

* Missing equal sign in regex?

* netdata/packaging/ci: Update tagger script
1) More verbose messages
2) Update comments copyrights etc
3) Rename release_candidate to set_tag_release_candidate
4) Add curlies on the variables, also change the way we check for path

* netdata/packaging/ci: reinstate git depth

* netdata/packaging/ci: Remove git depth from packaging too

* netdata/packaging/ci: RTFM - was using wrong syntax for slack @here approach

* netdata/packaging/ci: Using install tag at the stage layer, overrides the global one for some reason. fix that

* netdata/packaging/ci: Dont use the pattern matching from travis, do it outside with a script

* netdata/packaging/ci: Do it the other way, script execution doesnt work there

* netdata/packaging/ci: Attempt to fix conditional on release, remove the faulty assumptions as provided by travis team

* netdata/packaging/ci: reintroduce the tag checking

* netdata/packaging/ci: you need to bring tag checking at the stage, as it is calculated during packaging step

* netdata/packaging/ci: you cant escape that one for the moment, merge them and we will rework it later again

* netdata/packaging/ci: dont forget git depth

* netdata/packaging/ci: bring back the dist checking

* netdata/packaging/ci: fix syntax

* netdata/packaging/ci: no depth

* netdata/packaging/ci: Introduce make dist validation tasks: Install from dist file and verify service is starting up

* netdata/packaging/ci: Add a couple more information for troubleshooting

* netdata/packaging/ci: Add extra information prior to executing crucial operations

* netdata/packaging/ci: Make rm error soft here

* netdata/packaging/ci: This is not needed here

* netdata/packaging/ci: Prepare for beta stage deployment process

- introduce a beta provider
- adjust key decryption process, different keys for beta, different for prod
- Enter conditions to deploy beta only on beta process and production only on production process
- Use travis variables, to allow multiple users have beta stages for deployment, if they want

* netdata/packaging/ci: add one more message

* netdata/packaging/ci: Bring back naming to the actual master branch

* netdata/packaging/ci: rename beta to dev

* netdata/packaging/ci: Make permanent restrictions for some of the stricts, so that we don't mess things up

* netdata/packaging/ci: Update README that was missed and also make sure git depth false is at the places needed

* netdata/packaging/ci: fix codacy complaints
2019-04-18 07:55:58 +03:00
Paul Emm. Katsoulakis
5a9afa2f3f
netdata/packaging/ci: Use proper notifier in slack message () 2019-04-17 16:36:19 +03:00
Paul Katsoulakis
6d75c63b0d
netdata/packaging/ci: nits ()
It is approved by @cakrit, not sure why github doesn't let me merge it since he is code owner.
We are still looking at this, merging for now as this is a really tiny and safe change anyway
2019-03-26 12:13:15 +00:00
Paul Katsoulakis
8f6b2bba3e
Integrity testing: Check published kickstart files integrity ()
* netdata/packaging/ci: Integrity testing

Introduce a scriptlet that validates kickstart integrity in my-netdata.io against the ones in the repo.
Run this through the pipeline on a scheduled manner.
Will refine the conditionals later, once i verify the stage is built up as expected

* netdata/packaging/ci: remove conditionals first

* netdata/packaging/ci: Adjust the names to something more appropriate. Run it along with nightlies

* netdata/packager/ci: Cleanup checksum validation for kickstart files (continued)

1) merge validate_kickstart_integrity.sh and tests/installer/checksums.sh
2) run checksums at the new point on the pipeline
3) Change that unstable gitignore check and use a more file-agnostic check that depends only on git that we already require
4) Do not run the kickstart validation on the online website everywhere, only on the nightly runs

* netdata/packaging/ci: First rounf of PR feedback adjustments

1) changes wordings as recommended
2) pass file info in parameter and use it in the wordings
3) as shellcheck suggests, use -n instead of ! -z. Makes sense actually, ! -z is kind of reverse logic that confuses

More adjustments on a follow up commit

* netdata/packaging/ci: Enable slack integration for kickstart validation

We want to be notified in a timely manner when the kickstart on the website is outdated.
Added a wrapper for incoming webhooks from slack and instead of failing the build we notify slack

Added a debug message in the end of the script to validate the process which i will remove on a follow up commit

* netdata/packaging/ci: fixes
fix sourcing path
missed the /, this new keyboard is a pain :p
2019-03-25 10:05:05 +00:00
Chris Akritidis
56ac9f5145
Support legacy Prometheus metric names for source average ()
* Support older prometheus metric unit naming and allow removal of units from metrics

* Update swagger

* Added bats tests, improved efficiency of checking units
2019-03-04 18:36:08 +01:00
Paweł Krupa
48a15d1642
prevent merging changes to kickstart.sh when checksum in docs is wrong () 2019-02-25 11:47:06 +01:00
Paweł Krupa
24c500a1ce
revert and test if files exist after installation ()
[netdata patch release]
2019-02-21 19:34:46 +01:00
Paweł Krupa
06a367d876
automatic shellchecking on .sh.in scripts ()
* CI linting .sh.in files

* make linter passing
2019-02-12 14:12:31 +01:00
Chris Akritidis
68e5ce8f9a
Bug fix for netdata behind authenticated proxies ()
* Was incorrectly updating the headers when the Authorization header was being sent

* Use X-Auth-Token instead of Authorization header, to allow the management API to work authenticated behind proxies as well
2019-01-18 23:06:51 +01:00
Paweł Krupa
d5be47e476
self-contained uninstaller ()
* self-contained uninstaller

* move lifecycle test to BATS

* remove all possible netdata service files

* add docs
2019-01-16 16:56:18 +01:00
Paweł Krupa
0dbd4fb0cb
GCS-based updater ()
* updater using GCS

* new lifecycle test

* modify lifecycle test

* Update netdata-updater.sh

* simplify conditions in installer

* less quotes
2019-01-16 12:48:08 +01:00
Chris Akritidis
08649bec37
Port ACLs, Management API and Health commands ()
##### Summary
fixes  
fixes 
fixes  
fixes  
fixes  
fixes 

Implements a command API for health which will accept commands via a socket to selectively suppress health checks. 

Allows different ports to accept different request types  (streaming, dashboard, api, registry, netdata.conf, badges, management)

Removes support for multi-threaded and single-threaded web servers.

##### Component Name
health, daemon
2019-01-15 12:49:28 +01:00
Paweł Krupa
c6ef7ac4ed
test building docker container on every PR ()
* test building docker container on every PR

* fix docker building and switch lifecycle test to use ubuntu cron

* clarify stage name
2019-01-10 13:04:06 +01:00
Paweł Krupa
8839f96e1f
copy updater script instead of linking it ()
* copy updater script instead of linking it

fix lifecycle test

* better installation msg

* updater and uninstaller shouldn't be in .gitignore

* discard copied uninstaller script
2019-01-02 11:03:17 +01:00
Paweł Krupa
545aa97455
Move installer dir under packaging ()
* move installer dir under packaging

* fix docs creation

* uninstaller is broken and fix will be created in 

* fix links in docs
2018-12-19 12:08:40 +01:00
Paweł Krupa
889734018b
Non-interactive uninstaller () 2018-12-18 14:02:34 +01:00
Vladimir Kobal
67608ce7c4
Fix file permissions () 2018-12-12 20:40:43 +02:00
Chris Akritidis
415f57c5bf
Ga ()
* Added GA tags to markdowns

* Add GA tags to mds
2018-12-07 11:30:04 +01:00
Paweł Krupa
b38ba2d316
lifecycle test () 2018-12-04 00:27:47 +01:00
Chris Akritidis
3aae8f6c2c Htmldoc ()
* First html documentation debug set

* Test 2

* Relative path changed

* Updated comments

* Cleanup, installation draft added

* fixes

* test

* test

* test

* First html documentation debug set

* Test 2

* Relative path changed

* Updated comments

* Cleanup, installation draft added

* fixes

* test

* test

* test

* First set of major cleanup/deduplication

* 2nd major cleanup

* update getting started structure

* Cleanup in using netdata

* Final cleanup/deduplication

* Added initial CONTRIBUTING.md, updated some info related to contributing on the orchestrators

* Removed Why-Netdata (included in new README in master), added link to CONTRIBUTING.md

* First html documentation debug set

* Updated Makefile.am to ignore the new md and htmldoc generation files

* Removing files from rebase

* First html documentation debug set

* Test 2

* Relative path changed

* Updated comments

* Cleanup, installation draft added

* fixes

* test

* test

* test

* First html documentation debug set

* Test 2

* Relative path changed

* Updated comments

* Cleanup, installation draft added

* test

* test

* First set of major cleanup/deduplication

* 2nd major cleanup

* update getting started structure

* Cleanup in using netdata

* Final cleanup/deduplication

* Added initial CONTRIBUTING.md, updated some info related to contributing on the orchestrators

* Removed Why-Netdata (included in new README in master), added link to CONTRIBUTING.md

* First html documentation debug set

* Updated Makefile.am to ignore the new md and htmldoc generation files

* Removing files from rebase

* Fixed Makefile.am

* Same line header and badges

* Fixed broken link

* CPU monitoring is in apps plugin

* Removed obsolete files

* Remove obsolete files

* - Make the Health API part of health/README.md new file web/api/health/README.md
- Make installer/LAUNCH.md part of deamon/README.md
- Move installer/MAINTAINERS.md to packaging/maintainers/README.md
- Move installer/DOCKER.md to docker/README.md
- Move system/README.md to daemon/config/README.md
- Move web/CUSTOM-DASHBOARDS.md to web/gui/custom/README.md
- Move web/CONFLUENCE-DASHBOARDS.md to web/gui/confluence/README.md

* Resolve codacy issue $(..) syntax instead of `..`

* Fix following warnings and add svgs to the data_structures/README.md
  - CHANGELOG.md
  - CODE_OF_CONDUCT.md
  - CONTRIBUTORS.md
  - REDISTRIBUTED.md
  - diagrams/data_structures/README.md
  - docker/README.md
WARNING -  Documentation file 'README.md' contains a link to 'collectors/plugins.d' which does not exist in the documentation directory.
WARNING -  Documentation file 'README.md' contains a link to 'collectors/statsd.plugin' which does not exist in the documentation directory.
WARNING -  Documentation file 'CONTRIBUTING.md' contains a link to 'web/CUSTOM-DASHBOARDS.md' which does not exist in the documentation directory.
WARNING -  Documentation file 'CONTRIBUTING.md' contains a link to 'web/CONFLUENCE-DASHBOARDS.md' which does not exist in the documentation directory.

* Wrong urls in data_structures/README.md svgs

* Fix svg URLs number 2

* Modify the first line of the main README.md, to enable proper static html generation. Executed after copying the file to htmldoc/src

* Added back Why Netdata

* Fixed link to registry in Why-Netdata.md

* Added Why-Netdata to buildyaml and to Makefile.am

* Replaced http links causing mixed content warnings

* Made buildhtml ignore the directory node_modules created by Netlify

* Corrected CONTRIBUTING.MD to CONTRIBUTING.md
2018-11-12 22:34:59 +02:00
Costa Tsaousis
0a78758a11
updated tests for the new hierarchy () 2018-10-24 00:35:56 +03:00
Costa Tsaousis
8fbf817ef8
modularized all source code ()
* modularized all external plugins

* added README.md in plugins

* fixed title

* fixed typo

* relative link to external plugins

* external plugins configuration README

* added plugins link

* remove plugins link

* plugin names are links

* added links to external plugins

* removed unecessary spacing

* list to table

* added language

* fixed typo

* list to table on internal plugins

* added more documentation to internal plugins

* moved python, node, and bash code and configs into the external plugins

* added statsd README

* fix bug with corrupting config.h every 2nd compilation

* moved all config files together with their code

* more documentation

* diskspace info

* fixed broken links in apps.plugin

* added backends docs

* updated plugins readme

* move nc-backend.sh to backends

* created daemon directory

* moved all code outside src/

* fixed readme identation

* renamed plugins.d.plugin to plugins.d

* updated readme

* removed linux- from linux plugins

* updated readme

* updated readme

* updated readme

* updated readme

* updated readme

* updated readme

* fixed README.md links

* fixed netdata tree links

* updated codacy, codeclimate and lgtm excluded paths

* update CMakeLists.txt

* updated automake options at top directory

* libnetdata slit into directories

* updated READMEs

* updated READMEs

* updated ARL docs

* updated ARL docs

* moved /plugins to /collectors

* moved all external plugins outside plugins.d

* updated codacy, codeclimate, lgtm

* updated README

* updated url

* updated readme

* updated readme

* updated readme

* updated readme

* moved api and web into webserver

* web/api web/gui web/server

* modularized webserver

* removed web/gui/version.txt
2018-10-15 23:16:42 +03:00
Paweł Krupa
d536ba6a43 fix spdx () 2018-09-30 02:36:42 +03:00
Paweł Krupa
0426209ead [cleanup crusade] linting shell scripts for docker, tests and python ()
* shell linting various scripts

* remove python-modules-installer.sh.in
2018-09-13 00:18:19 +03:00
paulfantom
b862a0096b
🚚 move profiling to tests directory 2018-09-09 15:25:53 +02:00