FAQ
Greeting everyone,

I'm trying to get the output of mco result in json format. However it looks
like it doesnt work for the command which has statistics in it. I'm not
sure if I'm missing something.

e.g. *#mco puppet status -F myvar=SOMETHING -j *
  --> The output is not json format

same for summery and count. i.e. mco puppet summery -F myvar=SOMETHING -j
#etc

However, runonce shows the output in json format.

*#mco puppet runonce -F myvar=SOMETHING -j*

Do any one know how can we convert the result of status,summery and count
into json format?

Thanks,
Jayesh

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Alan F at Oct 22, 2013 at 11:37 pm
    You're interacting with a higher level mco application, the puppet
    application, which wraps around calling the agent. You probably want to
    query the agent directly, using the rpc application.

    try:

    mco rpc puppet status -F myvar=something --json
    On 22/10/13 17:31, Jayesh Mahajan wrote:
    Greeting everyone,

    I'm trying to get the output of mco result in json format. However it
    looks like it doesnt work for the command which has statistics in it.
    I'm not sure if I'm missing something.

    e.g. *#mco puppet status -F myvar=SOMETHING -j *
    --> The output is not json format

    same for summery and count. i.e. mco puppet summery -F
    myvar=SOMETHING -j #etc

    However, runonce shows the output in json format.

    *#mco puppet runonce -F myvar=SOMETHING -j*

    Do any one know how can we convert the result of status,summery and
    count into json format?

    Thanks,
    Jayesh

    --
    You received this message because you are subscribed to the Google
    Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jayesh Mahajan at Oct 23, 2013 at 5:40 pm
    You rocks Alan.. You saved lot of my time. Thanks a lot
    On Tuesday, October 22, 2013 5:10:42 PM UTC-4, Alan wrote:

    You're interacting with a higher level mco application, the puppet
    application, which wraps around calling the agent. You probably want to
    query the agent directly, using the rpc application.

    try:

    mco rpc puppet status -F myvar=something --json

    On 22/10/13 17:31, Jayesh Mahajan wrote:

    Greeting everyone,

    I'm trying to get the output of mco result in json format. However it
    looks like it doesnt work for the command which has statistics in it. I'm
    not sure if I'm missing something.

    e.g. *#mco puppet status -F myvar=SOMETHING -j *
    --> The output is not json format

    same for summery and count. i.e. mco puppet summery -F
    myvar=SOMETHING -j #etc

    However, runonce shows the output in json format.

    *#mco puppet runonce -F myvar=SOMETHING -j*

    Do any one know how can we convert the result of status,summery and
    count into json format?

    Thanks,
    Jayesh

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to puppet-users...@googlegroups.com <javascript:>.
    To post to this group, send email to puppet...@googlegroups.com<javascript:>
    .
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedOct 22, '13 at 4:38p
activeOct 23, '13 at 5:40p
posts3
users2
websitepuppetlabs.com

2 users in discussion

Jayesh Mahajan: 2 posts Alan F: 1 post

People

Translate

site design / logo © 2022 Grokbase