If I run below command on puppet master. I am able to get output pasted here. But the same information, I am trying to capture via browser using http://puppetdb:8080/v2/facts/operatingsystem but not working [root@puppetmaster ~]curl -X GET http://puppetdb:8080/v2/facts/operatingsystem curl: (6) Couldn''t resolve host ''puppetdb'' [root@puppetmaster ~]# curl -X GET http://localhost:8080/v2/facts/operatingsystem [ { "certname" : "es-w2k8sql2k804.vshimslab.com", "name" : "operatingsystem", "value" : "windows" }, { "certname" : "infafr00012.nmumarl.lntinfotech.com", "name" : "operatingsystem", "value" : "CentOS" }, { "certname" : "puppetmaster", "name" : "operatingsystem", "value" : "CentOS" -- 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.
Raju Patil
2013-Sep-18 11:40 UTC
[Puppet Users] Re: Not able to capture node info via browser
On Wednesday, 18 September 2013 16:59:29 UTC+5:30, Raju Patil wrote:> > If I run below command on puppet master. I am able to get output pasted > here. > But the same information, I am trying to capture via browser using > http://puppetserverip:8080/v2/facts/operatingsystem but not working > > > > [root@puppetmaster ~]# curl -X GET > http://localhost:8080/v2/facts/operatingsystem > [ { > "certname" : "es-w2k8sql2k804.vshimslab.com", > "name" : "operatingsystem", > "value" : "windows" > }, { > "certname" : "infafr00012.nmumarl.lntinfotech.com", > "name" : "operatingsystem", > "value" : "CentOS" > }, { > "certname" : "puppetmaster", > "name" : "operatingsystem", > "value" : "CentOS" >-- 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.
Ken Barber
2013-Sep-18 11:42 UTC
Re: [Puppet Users] Not able to capture node info via browser
> If I run below command on puppet master. I am able to get output pasted > here. > But the same information, I am trying to capture via browser using > http://puppetdb:8080/v2/facts/operatingsystem but not workingWell, a browser probably won''t work trying to traverse that URL anyway, since a browser will send Accept: text/html instead of application/json, however I''m not quite sure what you are trying to achieve. In short, this is an API end-point, not for browsers to traverse.> [root@puppetmaster ~]curl -X GET > http://puppetdb:8080/v2/facts/operatingsystem > curl: (6) Couldn''t resolve host ''puppetdb''The clue here is "Couldn''t resolve host ''puppetdb''" ... this is a host resolution issue occurs everywhere when resolution fails, nothing to do with PuppetDB specifically. Check your Host entries to make sure that the entry exists: http://en.wikipedia.org/wiki/Hosts_(file) ken. -- 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.
Raju Patil
2013-Sep-19 12:57 UTC
[Puppet Users] Re: Not able to capture node info via browser
Here, puppetdb is just an example, I have given the fact is I am able to open this URL using localhost & curl command in Linux terminal. However, same I am expecting to get via browser. I am trying to check feasibility of pupet to integrate with third party tool. Here, we are developing in house automation tool & trying to push & execute scripts remotely from puppet master On Wednesday, 18 September 2013 16:59:29 UTC+5:30, Raju Patil wrote:> If I run below command on puppet master. I am able to get output pasted > here. > But the same information, I am trying to capture via browser using > http://puppetdb:8080/v2/facts/operatingsystem but not working > > > > [root@puppetmaster ~]curl -X GET > http://puppetdb:8080/v2/facts/operatingsystem > curl: (6) Couldn''t resolve host ''puppetdb'' > [root@puppetmaster ~]# curl -X GET > http://localhost:8080/v2/facts/operatingsystem > [ { > "certname" : "es-w2k8sql2k804.vshimslab.com", > "name" : "operatingsystem", > "value" : "windows" > }, { > "certname" : "infafr00012.nmumarl.lntinfotech.com", > "name" : "operatingsystem", > "value" : "CentOS" > }, { > "certname" : "puppetmaster", > "name" : "operatingsystem", > "value" : "CentOS" >-- 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.
Ken Barber
2013-Sep-19 13:07 UTC
Re: [Puppet Users] Re: Not able to capture node info via browser
> Here, puppetdb is just an example, I have given the fact is I am able to > open this URL using localhost & curl command in Linux terminal.Okay.> However, same I am expecting to get via browser.Right but like I said, the API parts don''t work in a browser unless you are using some form of Javascript/AJAX style access. The API is designed to be programmatically called via another program or piece of software. There is a dashboard though which does contain some browser content for humans to look at, is that what you mean? Your two statements are not making sense to me, one the one hand you want to access the API and integrate things from another tool, but on the other hand you expect browser output. I presume the confusion here is that you are having connectivity issues generally and that a ''browser'' is just a method of testing that.> I am trying to check > feasibility of pupet to integrate with third party tool.Right, and PuppetDB totally supports integration via its various REST api''s: http://docs.puppetlabs.com/puppetdb/1.4/api/index.html> Here, we are developing in house automation tool & trying to push & execute > scripts remotely from puppet masterI see, like mcollective? http://puppetlabs.com/mcollective So besides your requirements ... did you see my previous point about your hosts entry? That was the fault that seemed to be occurring for your second curl, have you been able to remedy this yet? The issue to me seems to be host resolution, not an issue with PuppetDB per se. ken. -- 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.