[Xymon] Querying xymond with perl socket

Olivier AUDRY olivier at audry.fr
Tue Nov 15 18:24:44 CET 2011


> Yes, I also want to biuld a sexy customer web 2.0 portal. Why should everyone 
> have to build their own ones, when we could at least cooperate on the 
> components, even if we don't cooperate on the actual portal.

Because we need to implement this regarding what is already existing in the compagny.

For my exemple I need to link the portal with the cmdb, the KB, the ticketing and the monitoring.

For exemple here is a few fonction I will use :

those are working :

get_group_by_host()     to get the name of the group compress for an host like database or application server etc.
get_hosts_by_plids()    to get the hosts for a given plateform id
get_plids_by_customer() to get all the plateform id for one customer
get_hosts_by_customer() to get all the hosts for a customer. Should be useless.

those will work :

get the country for an host
get the datacenter for an host
get the test list for an host
get the status for a test for an hosts
get the type and os for a device.

with this I think I can do something great.


oau


----- Mail d'origine -----
De: Buchan Milne <bgmilne at staff.telkomsa.net>
À: Olivier AUDRY <olivier at audry.fr>
Cc: xymon at xymon.com
Envoyé: Tue, 15 Nov 2011 16:56:40 +0100 (CET)
Objet: Re: [Xymon] Querying xymond with perl socket

On Tuesday, 15 November 2011 16:59:54 Olivier AUDRY wrote:
> hello
> 
> as I understand your script send information from the client to the server.
> It's not what I'm doing. I trying to get information from the server to
> create a customer portal "sexy web 2.0 in da cloud".

It pulls data out too:

[bgmilne at tiger lib]$ PERL5LIB=`pwd` perl bb.pl localhost 'hobbitdboard 
test=conn'
$VAR1 = [
          'bgmilne-pc|conn|red|ordAstLe|1321339551|1321372239|1321374039|0|0|
127.0.0.1|801550|red <!-- [flags:ordAstLe] --> Tue Nov 15 17:50:21 2011 conn 
NOT ok ',
          'localhost|conn|green|OrdAstLe|1321339551|1321372239|1321374039|0|0|
127.0.0.1|-1|green <!-- [flags:OrdAstLe] --> Tue Nov 15 17:50:21 2011 conn ok 
',
          'printer|conn|red|ordAstLe|1321339551|1321372239|1321374039|0|0|
127.0.0.1|348830|red <!-- [flags:ordAstLe] --> Tue Nov 15 17:50:21 2011 conn 
NOT ok ',
          'tiger.ranger.dnsalias.com|conn|green|OrdAstLe|1321339551|
1321372239|1321374039|0|0|127.0.0.1|-1|green <!-- [flags:OrdAstLe] --> Tue Nov 
15 17:50:21 2011 conn ok '
        ];

But, you don't have to just dump the data with Data::Dumper, the example bb.pl 
just does that to show how the data is returned by the Xymon::Client object.

Yes, I also want to biuld a sexy customer web 2.0 portal. Why should everyone 
have to build their own ones, when we could at least cooperate on the 
components, even if we don't cooperate on the actual portal.

Regards,
Buchan




More information about the Xymon mailing list