netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [nft PATCH 4/4] doc: document monitor op
Date: Wed, 14 May 2014 17:36:28 +0200	[thread overview]
Message-ID: <20140514153628.25186.45489.stgit@nfdev.cica.es> (raw)
In-Reply-To: <20140514153146.25186.58208.stgit@nfdev.cica.es>

Let's add some documentation about the monitor operation.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
 doc/nft.xml |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/doc/nft.xml b/doc/nft.xml
index 61ca03a..41c0840 100644
--- a/doc/nft.xml
+++ b/doc/nft.xml
@@ -2099,6 +2099,48 @@ filter input iif eth0 drop
 				</programlisting>
 			</para>
 		</refsect2>
+		<refsect2>
+			<title>monitor</title>
+			<para>
+				The monitor command allows you to listen to Netlink events produced
+				by the nf_tables subsystem, related to creation and deletion of objects.
+				When they ocurr, nft will print to stdout the monitored events in either
+				XML, JSON or native nft format.
+			</para>
+			<para>
+				To filter events related to a concrete object, use one of the keywords 'tables', 'chains', 'sets', 'rules', 'elements'.
+			</para>
+			<para>
+				To filter events related to a concrete action, use keyword 'new' or 'destroy'.
+			</para>
+			<para>
+				Hit ^C to finish the monitor operation.
+			</para>
+			<example>
+				<title>Listen to all events, report in native nft format</title>
+				<programlisting>
+% nft monitor
+				</programlisting>
+			</example>
+			<example>
+				<title>Listen to added tables, report in XML format</title>
+				<programlisting>
+% nft monitor new tables xml
+				</programlisting>
+			</example>
+			<example>
+				<title>Listen to deleted rules, report in JSON format</title>
+				<programlisting>
+% nft monitor destroy rules json
+				</programlisting>
+			</example>
+			<example>
+				<title>Listen to both new and destroyed chains, in native nft format</title>
+				<programlisting>
+% nft monitor chains
+				</programlisting>
+			</example>
+		</refsect2>
 	</refsect1>
 
 	<refsect1>


      parent reply	other threads:[~2014-05-14 15:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 15:36 [nft PATCH 0/4] small updates to documentation Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 1/4] doc: fix indendation of examples Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 2/4] doc: update return code for NFT_EXIT_NONL Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 3/4] doc: document export op Arturo Borrero Gonzalez
2014-05-14 15:36 ` Arturo Borrero Gonzalez [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140514153628.25186.45489.stgit@nfdev.cica.es \
    --to=arturo.borrero.glez@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).