in reply to Re: Host address not getting
in thread Host address not getting

My bad, i think i didn't explain it well. Actually i am working on nagios where i have a group with multiple servers information in the file. Now i have a perl script which basically run and take the information from XML through URL. Instead of i put the hostaddress (http://hostaddress:8161/admin/xml/queues.jsp)as a ARGV, was wondering if perl script take the host address from that file automatically.

Replies are listed 'Best First'.
Re^3: Host address not getting
by kennethk (Abbot) on Sep 26, 2013 at 21:23 UTC

    Not familiar with 'nagios', but there certainly shouldn't be any reason Perl can't parse the file and pull the addresses. Can you show us what the file looks like?


    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Re^3: Host address not getting
by Marshall (Canon) on Sep 27, 2013 at 03:54 UTC
    Host address of: http://hostaddress is just not going to "work".
    You need something that will work in a browser.
    Maybe $hostaddress = Google; or something like that.
    Simple "hostaddress" won't work.

    First step is to see the webpage in a browser window before you try to get Perl to do it.

    This "8161" is a port address at a specific web site.

    my ($site) = ARGV; #might work better
    If you ask about a command line parm, then show it in your question.