Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add k8s/mesos/container info to rule outputs. #134

Merged
merged 2 commits into from
Oct 13, 2016
Merged

Conversation

mstemm
Copy link
Contributor

@mstemm mstemm commented Oct 13, 2016

Add support for -pc/-pk/-pm/-k/-m options that do the same thing as the
sysdig options--change output formats to have container-friendly
information, pulling information when necessary from kubernetes/mesos.

See commits for more details.

This fixes #131.

There are a lot of command line options now, so sort them alphabetically
in the usage and getopt handling to make them easier to find.

Also rename -p <pidfile> to -P <pidfile>, thinking ahead to the next
commit.
Copy handling of -pk/-pm/-pc/-k/-m arguments from sysdig. All of the
relevant code was already in the inspector so that was easy.

The information from k8s/mesos/containers is used in two ways:

- In rule outputs, if the format string contains %container.info, that
  is replaced with the value from -pk/-pm/-pc, if one of those options
  was provided. If no option was provided, %container.info is replaced
  with a generic %container.name (id=%container.id) instead.

- If the format string does not contain %container.info, and one of
  -pk/-pm/-pc was provided, that is added to the end of the formatting
  string.

- If -p was specified with a general value (i.e. not
  kubernetes/mesos/container), the value is simply added to the end and
  any %container.info is replaced with the generic value.
@mstemm mstemm merged commit 1f7c711 into dev Oct 13, 2016
@mstemm mstemm deleted the add-k8s-mesos-support branch October 13, 2016 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add analog of sysdig's -pk, -pc, -pm to provide container/k8s/mesos specific information
1 participant