* 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
* 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.
#### Summary
Fixes#3117
Additionally it adds support for UTF-8 in URL parser (as it should).
Label sizes now are updated by browser with JavaScript (although guess is still calculated by verdana11_widths with minor improvements)
#### Component Name
API/Badges, LibNetData/URL
#### Additional Information
It was found that not only verdana11_widths need to be updated but the url parser replaces international characters with spaces (one space per each byte of multibyte character).
Therefore I update both to support international chars.
* configure.ac: Add support for GCC's __attribute__((unused))
When compiling under GCC with -Wextra (along with -Wall) there are a lot
of compiler warnings such as
collectors/cgroups.plugin/cgroup-network.c:89:45: warning: unused parameter ‘scope’ [-Wunused-parameter]
89 | struct iface *read_proc_net_dev(const char *scope, const char *prefix) {
| ~~~~~~~~~~~~^~~~~
Some arguments may be able to be got rid off, others won't.
GCC (and at least clang[0]) provide an __attribute__((unused))
annotation that can be used on function parameters (also on variables,
functions, labels, enums, structs etc) to inform the compiler of such
and will squash warnings of the above nature.
A check is added to configure.ac for the use of GCC (I believe $GCC will
be set to 'yes' for clang also) and if found it creates __always_unused
& __maybe_unused #define's set to __attribute__((unused)) otherwise it
just sets them empty.
If other compilers have a similar feature this check can be adjusted to
accommodate them.
The reason for the two defines is that some variables may always be
unused in a function, others may or may not depending on #ifdef's for
example. So we are able to document both cases.
Subsequent commits will start making use of these to squash such
compiler warnings.
[0]: https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused
Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net>
* collectors/statsd.plugin: Mark a function argument as __maybe_unused
In collectors/statsd.plugin/statsd.c the app function argument to
STATSD_APP_CHART_DIM() might be unused if NETDATA_INTERNAL_CHECKS is not
defined, then the debug() macro that it's used in from
libnetdata/log/log.h will be defined to a dummy function where none of
the arguments are used.
This fixes a compiler warning [-Wunused-parameter] when compiling with
-Wextra *and* -Wall.
Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net>
* collectors/apps.plugin: Mark a function argument as __maybe_unused
In collectors/apps.plugin/apps_plugin.c the function
debug_print_process_tree() takes an argument 'msg' that might be unused
if NETDATA_INTERNAL_CHECKS is not defined, then debug_log() will be set
to a dummy function that takes no arguments.
This fixes a compiler warning [-Wunused-parameter] when compiling with
-Wextra *and* -Wall.
Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net>
* libnetdata/locks/locks: Mark function arguments as __maybe_unused
In libnetdata/locks/locks.c there a number of functions that take
arguments 'file', 'function' & 'line' that might be unused if
NETDATA_INTERNAL_CHECKS is not defined, then the debug() macro that it's
used in from libnetdata/log/log.h will be defined to a dummy function
where none of the arguments are used.
This fixes compiler warnings [-Wunused-parameter] when compiling with
-Wextra *and* -Wall.
Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net>
* libnetdata/socket/security: Mark a function argument as __maybe_unused
In libnetdata/socket/security.c the function security_info_callback()
takes an argument 'ret' that might be unused if NETDATA_INTERNAL_CHECKS
is not defined, then the debug() macro that it's used in from
libnetdata/log/log.h will be defined to a dummy function where none of
the arguments are used.
This fixes a compiler warning [-Wunused-parameter] when compiling with
-Wextra *and* -Wall.
Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net>
* collectors/cgroups.plugin: Mark a function argument as __maybe_unused
In collectors/cgroups.plugin/cgroup-network.c the function
read_proc_net_dev() takes an argument 'scope' that might be unused if
the NETDATA_INTERNAL_CHECKS is not defined.
This fixes a compiler warning [-Wunused-parameter] when compiling with
-Wextra *and* -Wall".
Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net>
* database/rrddim: Mark function arguments as __maybe_unused
In database/rrddim.c there a couple of functions that take a 'st'
argument that might be unused if NETDATA_INTERNAL_CHECKS is not defined,
then the debug() macro that it's used in from libnetdata/log/log.h will
be defined to a dummy function where none of the arguments are used.
This fixes compiler warnings [-Wunused-parameter] when compiling with
-Wextra *and* -Wall.
Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net>
* database/rrdvar: Mark a function argument as __maybe_unused
In database/rrdvar.c the function rrdvar_create_and_index() take an
argument 'scope' that might be unused if NETDATA_INTERNAL_CHECKS is not
defined, then the debug() macro that it's used in from
libnetdata/log/log.h will be defined to a dummy function where none of
the arguments are used.
This fixes a compiler warning [-Wunused-parameter] when compiling with
-Wextra *and* -Wall.
Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net>
#### Summary
Add a documentation page for running netdata via HAproxy. The example includes:
A simple configuration over http
A more complex example over https
Instructions on how to use HTTP authentication
A full configuration example
Component Name
docs
#### Additional Information
Fixes#6446
As part of #6165, we faced an issue with mac OS installation where edit-config file was havint the wrong variables setup.
After deep investigation on the way Formulae was building netdata, we realized that generated edit-config was delivered
together with the generated edit-conf, thus resulting on not re-creating it with the right variables.
So the fix here is to not deliver edit-config with the distribution tarball, so that it gets generated as it should
* Read user names from file
* Separate file modification check
* Read group names from file
* Update the documentation
* Use files only inside a containter
* Fix the volume mounting suggestions
* netdata/packaging: [ci skip] Add prometheus remote write plugin deps
* netdata/packaging: [ci skip] adjust for the tests
* netdata/packaging: [ci skip] Apparently we need proto-c too
* netdata/packaging: [ci skip] Add dependencies also
* netdata/packaging: [ci skip] fix suse dependency
* netdata/packaging: [ci skip] epel-release should always go first dumdum
* netdata/packaging: [ci skip] g++ needed for prometheus
* netdata/packaging: First prepare the repo, then start throwing in packages
* netdata/packaging: [ci skip] fix attempt for missing snappy on some debian-based packages
* netdata/packaging: [ci skip] protobuf compiler dep
* netdata/packaging: [ci skip] Add the generic maintainer info and the new website. Also stop pushing snappy to Debian/Stretch, doesnt have it
* netdata/packaging: [ci skip] Remove branch dev setup
* Empty commit to re-trigger Travis
* Update default installation procedure to use --stable-channel
* Small typographic fixes
* Fixing mixup with kickstart64 script
* Updated install instructions to keep nightly as default and instead warn about nightlies
* Removed extra 'the'
* Added new text for nightly vs stable
* Created new docs homepage with attempt to "fix" build script
* Created new docs homepage with attempt to "fix" build script
* Trying more links
* Trying more links
* Move documentation homepage and got script mostly working
* Move documentation homepage and got script mostly working
* Final changes based on C&C feedback
* Final changes based on C&C feedback
* A few new custom styles
* A few new custom styles
* Removing unnecessary sed
* Removing unnecessary sed
* Final fixes to docs homepage
* Final fixes to docs homepage
* Cleanup on DOCUMENTATION page
* Remove localization folder
* Fixed typo
* Created buttons for new documentation homepage.
* Remove whitespace
* Cleanup in the CSS file
* Working on replacing html content
* Finalized new build process
* Updated the new what is Netdata page
* Fixed all the broken links
* jsonfix
The use of sprintf to copy from a name to other name could create
overflow, because source and destination have the same size, to avoid
this I am changing the sprintf to snprintf'
* jsonfix
Use internal netdata snprintfz instead snprintf
* netdata/packaging: [ci skip] reinstate dev branch to help testing
* netdata/packaging: [ci skip] Yes, make the right package choice on json-c for debian based distros..
* netdata/packaging: [ci skip] two more packages that differentiate on debian/ubuntu...............
* netdata/packaging: [ci skip] Add more package dependencies around building
* netdata/packaging: [ci skip] Introduce changelog generation technique for .DEB
1) Remove contrib/debian/changelog from gitignore, we want it in
2) Add variables to monitor latest release version and latest release date from git
3) Add a templated contrib/debian/changelog, that will be the starting point for our changelog generation.
Either on stable release or nightly releases, we will be generating the logs since the previous release, to manage the content.
Note: We might eventually take the effort to produce one large changelog and append each time the extra stuff
4) Add the steps to prepare the source and the changelog for building and execute the build
At this stage things should still be broken, but we should have come closer to a ready-to-build-the-package environment per distro
* netdata/packaging: [ci skip] Extract to specified directory, otherwise we dump it on a privileged folder using an unprivileged user (builder)
Also, a fix on sed command, missed the s keyword on the string
replacement
* netdata/packaging: [ci skip] Should be in-place replacement, use -i instead of -e
* netdata/packaging: [ci skip] wrong parameter usage
* netdata/packaging: [ci skip] factor out the two build commands to run as a single bundle. refactor trigger deb build script respectively
* netdata/packaging: [ci skip] Be sure to copy over the build script to the build path
* netdata/packaging: [ci skip] OCD - unnecessary s added
* netdata/packaging: [ci skip] Changelog generation should take place on the repo side, then copy it over to the destination (If that doesnt work well, will just provide a static link for changelog
* netdata/packaging: [ci skip] missed the ignore branch option
Also, a nit on the gbp command
* netdata/packaging: [ci skip] link to the original path, then create symlink on build folder
Also, fix --since option
* netdata/packaging: [ci skip] Run replacement of changelog fields on the host, not on the container
* netdata/packaging: [ci skip] fix contrib path, you are no longer reading from container path
* netdata/packaging: [ci skip] fix version
* netdata/packaging: [ci skip] add dep
* netdata/packaging: [ci skip] fix changelog template
* netdata/packaging: [ci skip] Fix debian package build, we were looping through forever. Exclude contrib all together
* netdata/packaging: [ci skip] Add logic to gather all package related content from the container folder and push it for publishing
* netdata/packaging: [ci skip] fixes and nits
1) use the branch for the beta deployment
2) change the cp pattern
* netdata/packaging:[ci skip] add more debug info
* netdata/packaging: [ci skip] Adjust LXC directory permissions, so that the rest of the workflow can pull through
* netdata/packaging: [ci skip] Using expressions within double quotes doesnt work, use quotes only on the variable to avoid syntax warnings from shellchecking
* netdata/packaging: [ci skip] Update build deps
* netdata/packaging: Add runtime deps (hopefully)
* netdata/packaging: [ci skip] remove old distro
* netdata/packaging: [ci skip] dont let that space there, breaks the syntax
* netdata/packaging: [ci skip] missed one
* netdata/packaging: [ci skip] yank yank yank
* netdata/packaging: [ci skip] You missed www over there
* netdata/packaging: [ci skip] Remove broken distros (no container images). We will revisit the way to support multiple distros in a different way, lxc failed us
* netdata/packaging: Pull in go.d plugin, also fix chmod command to just pass the folder since with the -R doesnt require anything else
* netdata/packaging: [ci skip] Get cups, freeipmi and nfacct on
* netdata/packaging: [ci skip] pull different package in
* netdata/packaging: [ci skip] Install dependencies on the build machine
* netdata/packaging: [ci skip] dont do post-clean, not on all versions
* netdata/packaging: [ci skip] move go install seperately
* netdata/packaging: [ci skip] Towards a more appropriate go.d plugin install
* netdata/packaging: [ci skip] fix permissions setting
* netdata/packaging: [ci skip] fix freeipmi package install
* netdata/packaging: [ci skip] Fix build arch setting on the build command, also remove pre-clean, it breaks on debian/jessie
* netdata/packaging: [ci skip] fix postinst actions, we use libexec
* netdata/packaging: adjust www and go.d permissions
* netdata/packaging: [ci skip] Handle the different build tool version cases, also take care some dependency issues on older version jessie
* netdata/packaging: [ci skip] adjust the control file based on the distro
* netdata/packaging: [ci skip] Move control file preparation prior to packaging the source
* netdata/packaging: [ci skip] Adjust versioning scheme for the nightlies
* netdata/packaging: [ci skip] Let RPM be built too for testing
* netdata/packaging: [ci skip] Factor out version calculation
* netdata/packaging: [ci skip] Attempt to modify version properly
* netdata/packaging: [ci skip] Update documentationg regarding .DEB files
* netdata/packaging: [ci skip] autogen not available everywhere, also fix json-c deps
* netdata/packaging: Remove development settings, also remove beta deployment as its not needed
* Changed mkdocs theme
* Added custom styles for various elements
* Moved to different syntax highlighting plugin
* Added a README for the docs/ folder to direct people to the docs site
* Change highlight theme
* Add global configuration option for zero metrics
* Add the option to the cgroup plugin
* Add the option to the proc plugin (diskstats, meminfo, net_dev,
netstat, sctp_snmp, snmp, snmp6, sockstat, sockstat6, synproxy,
vmstat, system_edac_mc, system_node, btrfs, ksm, zfs)
* Add the option to the macos plugin
* Add the option to the freebsd plugin (devstat, getifaddrs,
getmntinfo, sysctl)
* Change the option behaviour with the 'auto' value
* Add the option to the tc plugin
* Update the documentation