Archived community.zenoss.org | full text search
Skip navigation
1 2 Previous Next 134273 Views 27 Replies Latest reply: Aug 17, 2010 1:56 PM by Edgar Tellez RSS
athreyavc Rank: White Belt 11 posts since
Jun 23, 2009
Currently Being Moderated

Aug 26, 2009 12:37 AM

php weathermap integration

Hi All,

I am using zenoss-core to monitor servers and Network devices.

I am trying to integrate weathermap with zenoss. Is it possible?

If anyone has done it , can you please guide me on this

I am no programmer and new to monitoring tools, Really impressed with zenoss.

Thanks and Regards,

Athreya
  • Matt Ray Rank: Zen Master 2,484 posts since
    Apr 5, 2008
    Currently Being Moderated
    1. Aug 26, 2009 12:52 AM (in response to athreyavc)
    php weathermap integration
    There is this excellent write-up: http://www.zenoss.com/Members/may/weathermap

    Thanks,
    Matt Ray
    Zenoss Community Manager
    community.zenoss.com
    mray@zenoss.com

    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • may Rank: Green Belt 144 posts since
    Jan 26, 2008
    Currently Being Moderated
    3. Aug 26, 2009 4:11 AM (in response to athreyavc)
    php weathermap integration
    1) Do you get any errors while running weathermap program? Try running
    it with debugging. It should produce html file and png file (which is
    loaded by html). Check that both files exists and access to them is
    allowed.
    2) You didn't catch the idea of integration of weathermap and zenoss.
    Weathermap can only read snmp|rrd data. You could try to point it to rrd
    files produced by zenoss, but if you don't want to write file names
    manually(which could be very boring) you should use another syntax in
    you weathermap config file (the one called map.src with special syntax
    described in how-to) and then convert it to native weathermap format.


    athreyavc wrote:

     

     

    Dear Sir,

    That was kind, thanks for the reply

    I tried the same steps.But I could not get the map work.

    I am also confused about this line,

    ./convert_map.pl map.src >map.conf

    I created the map using php weathermap web editor.

    then I saved the file as simple.conf. (I don't know about the src file),

    Then I ran

    ./convert_map.pl simple.conf > simple.conf

    No errors here

    then I created the html file

    php ./weathermap --config simple.conf --htmloutput /var/www/html/simple.html

    I access the link by

    http://systemIP/simple.html

    page is blank

    I must be doing something wrong here.

    Sorry for so many questions, I am a Storage Engineer, trying to learn ZenOSS.

    Thanks again ,

    Athreya







    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users


    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • may Rank: Green Belt 144 posts since
    Jan 26, 2008
    Currently Being Moderated
    5. Aug 27, 2009 10:17 AM (in response to athreyavc)
    php weathermap integration
    athreyavc wrote:

     

     

    Dear Sir,

    Thank for the reply.

    My undestanding on the integration is this.

    1. We create the map using the Syntaxes and it is saved as map.src

    2. Then we use the convert_map.pl and create a conf file map.conf

    3. Then we process map.conf with weathermap script, which will create an html file and png file


    Right.

     

     

    4. We access the html file using the web server. This file will have the rrd links for the devices , So the map is having a ZenOSS backend.

    No, the file does not have links to rrd. When you run convert_map.pl it
    reads data from zenoss (via xml-rpc call) and puts this into map.conf.
    But this data are only valid for the current moment of time. It just
    creates static targets in terms of weathermap.
    And weathermap draws links, devises an so on according on this data.
    After that you should repeat this process each 5 minutes via cron job,
    i.e. you should add convert_map.pl and weathermap calls to cron.

     

     

    Am I right ?

    What I did

    1. Created the map using web editor of the Weathermap.

    2. Saved it as map.src


    Web editors knows nothing about special syntax needed by convert_map.pl.
    You could use it only as starting point and then edit file manually.

     

     

    3. Tried to convert it with convert_map.pl

    I am getting the error as ,

    Global Symbol "node" requires explicit package name at ./convert_map.pl line 11

    This error means that there is smth wrong in convert_map.pl. May be this
    file was broken during download?
    Could you post top 12 lines of this file?

     

     

    I saw it is creating map.conf which zero bytes.

    As soon as convert_map.pl produced errors output file is empty.

     

     

    Am I anyway near ?

    Regards,

    Athreya







    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users


    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • may Rank: Green Belt 144 posts since
    Jan 26, 2008
    Currently Being Moderated
    7. Aug 28, 2009 2:12 AM (in response to athreyavc)
    php weathermap integration
    athreyavc wrote:

     

     

    Hi Sir,

    Thanks again for the reply, I really don't have words to appreciate such a detailed explanation.

    Please find the 12 lines below ,

    1 #!/usr/bin/perl
    2 use JSON::XS;
    3 use strict;
    4 my server="192.168.131.89";
    5 my port="8080";
    6 my user="admin";
    7 my password="1q2w3e4r";
    8 my %devices;
    9 my wget="/usr/bin/wget";
    10 my wget_type=1 # 1 - older wget, 2 - later version

    There is missing ; at previous line. You deleted ; symbol. It should be:

    my $wget_type=1;



     

     

    11 my node;
    12 my url;


    Also my wget version is ,

    Also, my wget version


    I don't know which wget version you should choose. Try both and see
    which works for you.

     

     

    [root@centos weathermap]# wget -V
    GNU Wget 1.10.2 (Red Hat modified)

    Copyright (C) 2005 Free Software Foundation, Inc.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
    [root@centos weathermap]#


    I am using centOS 5 .

    Best Regards,

    Athreya







    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users


    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    8. Aug 28, 2009 12:33 PM (in response to may)
    RE: php weathermap integration
    Anyone else having a problem without put like this? When using ./weathermap to generate, there are complaints about the highlighted areas. The <%rrd{block}%> also doesn't seem to get replaced properly.

    Any help is greatly appreciated! :-)

    NODE NodeA
    LABEL NodeA - 172.16.110.46
    ICON 200 100 images/Firewall.png
    POSITION 200 100
    INFOURL http://172.160.126.131:8080/zport/dmd/Devices/Network/Router/Firewall/Juniper/devices/NodeA
    [['zenevents_5_noack noack', 0, 0], ['zenevents_4_noack noack', 0, 0], ['zenevents_3_noack noack', 0, 0], ['zenevents_2_noack noack', 0, 0], ['zenevents_1_noack noack', 0, 0]]

    TARGET static:0

    NODE NodeB
    LABEL NodeB- 172.16.110.52
    ICON 200 100 images/Switch.png
    POSITION 200 100
    POSITION NodeA +150 +200
    INFOURL http://172.160.126.131:8080/zport/dmd/Devices/Network/Switch/Nortel/Baystack/devices/NodeB
    [['zenevents_5_noack noack', 0, 0], ['zenevents_4_noack noack', 0, 0], ['zenevents_3_noack noack', 0, 0], ['zenevents_2_noack noack', 0, 0], ['zenevents_1_noack noack', 0, 0]]

    TARGET static:0

    LINK NodeA-NodeB
    WIDTH 5
    NODES NodeA NodeB
    [color=red] TARGET static:<%rrd(NodeA,os/interfaces/ethernet1%2F1,ifOutErrors)%>[/color]
  • may Rank: Green Belt 144 posts since
    Jan 26, 2008
    Currently Being Moderated
    9. Aug 28, 2009 4:07 PM (in response to Shane Scott)
    php weathermap integration
    Please, send me you source map file, result map file and what
    convert_map.pl prints to screen, if it does.
    Which zenoss version you are using?
    These lines

    ['zenevents_5_noack noack', 0, 0], ['zenevents_4_noack noack', 0, 0], ['zenevents_3_noack noack', 0, 0],

    should no be there. Its seems something is wrong.

    Ah, may be I know what the problem is. Maybe it is because of %2F in
    your interface name. Can you check it on anotherdevice with different
    interface names?


    hackman238 wrote:

     

     

    Anyone else having a problem without put like this? When using ./weathermap to generate, there are complaints about the highlighted areas. The <%rrd{block}%> also doesn't seem to get replaced properly.

    Any help is greatly appreciated! :-)

    NODE NodeA
    LABEL NodeA - 172.16.110.46
    ICON 200 100 images/Firewall.png
    POSITION 200 100
    INFOURL http://172.160.126.131:8080/zport/dmd/Devices/Network/Router/Firewall/Juniper/devices/NodeA
    [['zenevents_5_noack noack', 0, 0], ['zenevents_4_noack noack', 0, 0], ['zenevents_3_noack noack', 0, 0], ['zenevents_2_noack noack', 0, 0], ['zenevents_1_noack noack', 0, 0]]
    TARGET static:0

    NODE NodeB
    LABEL NodeB- 172.16.110.52
    ICON 200 100 images/Switch.png
    POSITION 200 100
    POSITION NodeA +150 +200
    INFOURL http://172.160.126.131:8080/zport/dmd/Devices/Network/Switch/Nortel/Baystack/devices/NodeB
    [['zenevents_5_noack noack', 0, 0], ['zenevents_4_noack noack', 0, 0], ['zenevents_3_noack noack', 0, 0], ['zenevents_2_noack noack', 0, 0], ['zenevents_1_noack noack', 0, 0]]
    TARGET static:0

    LINK NodeA-NodeB
    WIDTH 5
    NODES NodeA NodeB
    TARGET static:<%rrd(NodeA,os/interfaces/ethernet1%2F1,ifOutErrors)%>







    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users


    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    10. Aug 31, 2009 1:24 PM (in response to may)
    Re: php weathermap integration

    "may" wrote:

     

    Please, send me you source map file, result map file and what
    convert_map.pl prints to screen, if it does.
    Which zenoss version you are using?
    These lines

    ['zenevents_5_noack noack', 0, 0], ['zenevents_4_noack noack', 0, 0], ['zenevents_3_noack noack', 0, 0],

    should no be there. Its seems something is wrong.

    Ah, may be I know what the problem is. Maybe it is because of %2F in
    your interface name. Can you check it on anotherdevice with different
    interface names?


    hackman238 wrote:

     

     

    Anyone else having a problem without put like this? When using ./weathermap to generate, there are complaints about the highlighted areas. The <%rrd{block}%> also doesn't seem to get replaced properly.

    Any help is greatly appreciated! :-)

    NODE NodeA
    LABEL NodeA - 172.16.110.46
    ICON 200 100 images/Firewall.png
    POSITION 200 100
    INFOURL http://172.160.126.131:8080/zport/dmd/Devices/Network/Router/Firewall/Juniper/devices/NodeA
    [['zenevents_5_noack noack', 0, 0], ['zenevents_4_noack noack', 0, 0], ['zenevents_3_noack noack', 0, 0], ['zenevents_2_noack noack', 0, 0], ['zenevents_1_noack noack', 0, 0]]
    TARGET static:0

    NODE NodeB
    LABEL NodeB- 172.16.110.52
    ICON 200 100 images/Switch.png
    POSITION 200 100
    POSITION NodeA +150 +200
    INFOURL http://172.160.126.131:8080/zport/dmd/Devices/Network/Switch/Nortel/Baystack/devices/NodeB
    [['zenevents_5_noack noack', 0, 0], ['zenevents_4_noack noack', 0, 0], ['zenevents_3_noack noack', 0, 0], ['zenevents_2_noack noack', 0, 0], ['zenevents_1_noack noack', 0, 0]]
    TARGET static:0

    LINK NodeA-NodeB
    WIDTH 5
    NODES NodeA NodeB
    TARGET static:<%rrd(NodeA,os/interfaces/ethernet1%2F1,ifOutErrors)%>

    You're correct, it was the %2F. I'm still getting the "[['zenevents_5_noack noack', 0, 0], ['zenevents_4_noack noack', 0, 0], ['zenevents_3_noack noack', 0, 0], ['zenevents_2_noack noack', 0, 0], ['zenevents_1_noack noack', 0, 0]]" line as a result for <%status%>.

    ZenOSS version is 2.4.2. Looks like severity info.





    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users


    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users

  • may Rank: Green Belt 144 posts since
    Jan 26, 2008
    Currently Being Moderated
    11. Aug 31, 2009 2:16 PM (in response to Shane Scott)
    php weathermap integration
    Hm, what?
    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    12. Aug 31, 2009 2:24 PM (in response to may)
    RE: php weathermap integration
    You're correct, it was the %2F. I'm still getting the "[['zenevents_5_noack noack', 0, 0], ['zenevents_4_noack noack', 0, 0], ['zenevents_3_noack noack', 0, 0], ['zenevents_2_noack noack', 0, 0], ['zenevents_1_noack noack', 0, 0]]" line as a result for <%status%>.

    ZenOSS version is 2.4.2. Looks like severity info.
  • may Rank: Green Belt 144 posts since
    Jan 26, 2008
    Currently Being Moderated
    13. Aug 31, 2009 3:10 PM (in response to Shane Scott)
    php weathermap integration
    Ok, I will check it later.
    Did you find a solution for %2F problem or your just checked it on
    different device?

    hackman238 wrote

     

     

    You're correct, it was the %2F. I'm still getting the "[['zenevents_5_noack noack', 0, 0], ['zenevents_4_noack noack', 0, 0], ['zenevents_3_noack noack', 0, 0], ['zenevents_2_noack noack', 0, 0], ['zenevents_1_noack noack', 0, 0]]" line as a result for <%status%>.

    ZenOSS version is 2.4.2. Looks like severity info.







    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users


    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    14. Aug 31, 2009 3:20 PM (in response to may)
    RE: php weathermap integration
    I've determined anytime Zenoss has a "\" or a " " character in an interface name you can use a "_" for http queries. This has only proven true for a few tests, so it could just be chance.

    Thanks!
1 2 Previous Next

More Like This

  • Retrieving data ...