about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHeikki Kallasjoki <fis@zem.fi>2018-12-04 23:26:01 +0000
committerHeikki Kallasjoki <fis@zem.fi>2018-12-04 23:26:01 +0000
commitf5c20e9c9b46ac6efe3c3948302e4e20718a5968 (patch)
treedda96bf692be1c71607306f2f836b50f9a57982b
parent65439870f86997a6c50170a17cf0e399a39020a6 (diff)
downloadnano-exporter-f5c20e9c9b46ac6efe3c3948302e4e20718a5968.tar.gz
nano-exporter-f5c20e9c9b46ac6efe3c3948302e4e20718a5968.tar.xz
nano-exporter-f5c20e9c9b46ac6efe3c3948302e4e20718a5968.zip
Documentation improvements.
Include OpenWrt feed and installation instructions, as well as more details (and a README link) on how to contribute to the project.
-rw-r--r--CONTRIBUTING.md20
-rw-r--r--README.md29
2 files changed, 47 insertions, 2 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 939e534..c1aba62 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -22,6 +22,26 @@ use GitHub pull requests for this purpose. Consult
 [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
 information on using pull requests.
 
+## Code style, structure & principles
+
+Please keep consistent with the existing code style, which is inspired
+by (the non-C++-specific parts of) the [Google C++ Style
+Guide](https://google.github.io/styleguide/cppguide.html), with a few
+exceptions: no mixed-case names, and a 100-character line length
+limit.
+
+The goal of the project is to be lightweight and have no large
+external dependencies. If you wish to add a collector that inherently
+depends on a library, it should be optional to the build, and probably
+not included by default.
+
+All exported metrics should be related to the node (host, machine...)
+the exporter is running on, not to any specific service running on
+it. Services should optimally export their own metrics natively, or
+via an exporter specific to the service. Alternatively, you might be
+interested in [mtail](https://github.com/google/mtail), which extracts
+monitoring data from log files.
+
 ## Community Guidelines
 
 This project follows [Google's Open Source Community
diff --git a/README.md b/README.md
index 55b66ce..801fcef 100644
--- a/README.md
+++ b/README.md
@@ -35,11 +35,36 @@ You can also use the bundled `Makefile`, which likely requires GNU
 Make. You can comment out collectors in the Makefile to leave them out
 of the build if you don't need them.
 
-TODO: OpenWrt feed + package definition + instructions.
-
 The metrics collection is highly Linux-specific. You probably won't
 have much luck on other operating systems.
 
+### Including in an OpenWrt build
+
+If you're building an OpenWrt system, you can include this program by
+adding the following line to your `feeds.conf` file:
+
+```
+src-git nanoexporter https://github.com/fis/nano-exporter.git;openwrt
+```
+
+Then update the feed, and install the package:
+
+```shell
+./scripts/feeds update nanoexporter
+./scripts/feeds install -p nanoexporter -a
+```
+
+The package `nano-exporter` should now be available in `make
+menuconfig`, under the "Utilities" heading.
+
+## Issues and contributions
+
+Please report any issues on the [GitHub issues
+page](https://github.com/fis/nano-exporter/issues).
+
+See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to
+contribute patches and other code.
+
 ## Collectors
 
 For the most part, the produced metrics try to loosely (but not