LSX-blog

Feed Rss

【原创】Cacti 与NPC插件结合不出图

08.17.2012, Linux, 故障分析, by .

环境:

CentOS 5.5

Cacti 0.8.7a

NPC 2.0.4

前题

因为我的环境是cacti+nagios+nconf+npc,所以我没有把cacti放到单独的域名下

而是域名指定这几个环境的上级目录,所以就会产生一个问题,访问cacti的路径就是

http://domain.com/cacti这样的形式

但这样就会生一个问题

image 

红圈,圈的两个功能将使用不正常,当然因为我这里是修复好的,所以截图是出现图形的

如果没有修复将会出现一个红叉,这个问题,苦想了我好长时间,前段时间,一直忙别的,就把

这个事给忘记了,今天又想起来,开始解决这个问题,用IE 8.0浏览器的开发人员工具

动态调试脚本

image

在动态调试过程中发现一个小问题,就是

var strLen = npc.params.cacti_path.length; 这一句,当时我看了就郁闷了,

strLen是取的长度 原代码确是:

var strLen = npc.params.cacti_path;

没有length这个单词,造成后面程序运行时取的字符为空.所以路径自然无法正常了

最后修改这个BUG,这是典型的BUG,程序员,疏忽.

./cacti/plugins/npc/controllers/layout.php:   

./cacti/plugins/npc/controllers/layoutDev.php:   

修改以上两个文件,正常.

【原创】Cacti 与NPC插件结合不出图 有 44 条回应

  1. Someone necessarily assist to make critically articles I’d state.
    This is the first time I frequented your website page and
    so far? I surprised with the analysis you made to make this actual publish
    extraordinary. Wonderful process!

    回复
  2. First off I want to say terrific blog! I had a quick question in which I’d like to ask
    if you do not mind. I was curious to know how you center yourself and clear your head before writing.
    I’ve had trouble clearing my mind in getting my ideas out
    there. I do take pleasure in writing but it just seems like
    the first 10 to 15 minutes are generally lost simply just trying to figure
    out how to begin. Any ideas or hints? Cheers!

    回复
  3. Thanks to my father who shared with me regarding this blog,
    this weblog is truly remarkable.

    回复
  4. Fine way of telling, and nice piece of writing to take facts concerning
    my presentation topic, which i am going to convey in college.

    回复
  5. Helpful information. Lucky me I found your
    web site unintentionally, and I’m surprised why
    this accident didn’t happened earlier! I
    bookmarked it.

    回复
  6. Thanks for another informative website. Where else may I
    am getting that kind of info written in such an ideal approach?
    I’ve a venture that I’m simply now running on, and I
    have been at the look out for such information.

    回复
  7. Painter And Decorator Gloucester
    38 Bruton Way
    Gloucester GL1 1DA, United Kingdom
    01452 223268

    回复
  8. viagra samples female viagra where to buy generic viagra

    回复
  9. cialis online india cialis without doctor prescription generic cialis for sale

    回复
  10. best place buy cialis buy canadian cialis best website to buy cialis

    回复
  11. Hi there! Do you know if they make any plugins to protect against hackers?
    I’m kinda paranoid about losing everything I’ve worked hard on. Any tips?

    回复
  12. how much is viagra without insurance buy viagra las vegas sildenafil citrate cenforce 50

    回复
  13. Wow, that’s what I was searching for, what a stuff! existing here at this blog, thanks admin of this website.|

    回复
  14. I all the time used to study piece of writing in news papers but now as I am a user
    of internet so from now I am using net for
    articles, thanks to web.

    回复
  15. Just want to say your article is as amazing. The clearness
    on your publish is just excellent and i can think you’re an expert
    on this subject. Fine with your permission let me to grasp your RSS feed to stay up to date with
    approaching post. Thanks a million and please continue the enjoyable
    work.

    回复
  16. This web site certainly has all of the info I wanted
    about this subject and didn’t know who to ask.

    回复
  17. Thank you for the good writeup. It actually used to be a
    amusement account it. Glance advanced to more added agreeable from
    you! However, how could we keep in touch?

    回复
  18. I do trust all of the ideas you have introduced to your
    post. They are really convincing and will definitely work.
    Still, the posts are very short for newbies. Could you please
    prolong them a little from subsequent time? Thanks for the post.

    回复
  19. I enjoy what you guys are usually up too. This type of clever work and exposure!
    Keep up the terrific works guys I’ve you guys to blogroll.

    回复
  20. It’s going to be ending of mine day, but before end I am reading this wonderful piece of writing to improve my knowledge.

    回复
  21. Good day! This is my 1st comment here so I just wanted to give a quick shout out and tell
    you I really enjoy reading through your posts. Can you suggest any other
    blogs/websites/forums that deal with the same topics?
    Thank you!

    回复
  22. Hi, i read your blog occasionally and i own a similar one and i was just curious if you get a lot of spam feedback?
    If so how do you prevent it, any plugin or anything you can suggest?
    I get so much lately it’s driving me mad so any help is very much appreciated.

    回复
  23. I got this website from my friend who shared with me regarding this website and now this time I
    am browsing this website and reading very informative posts at this time.

    回复
  24. I could not resist commenting. Well written!

    回复
  25. If you would like to get a great deal from this paragraph then you have to apply these methods to your won blog.

    回复
  26. I’m really enjoying the design and layout of your website.

    It’s a very easy on the eyes which makes it much more pleasant for me
    to come here and visit more often. Did you hire out a designer to create your theme?
    Exceptional work!

    回复
  27. I’ve been surfing online more than 2 hours
    today, yet I never found any interesting article like yours.
    It is pretty worth enough for me. In my view, if
    all website owners and bloggers made good content as you did,
    the web will be a lot more useful than ever before.

    回复
  28. Do you have a spam problem on this blog; I also am a blogger, and I was wanting to know your situation;
    many of us have developed some nice practices and we are looking to swap solutions with others, why not shoot me an email if interested.

    回复
  29. This post will assist the internet viewers for building up new web site
    or even a weblog from start to end.

    回复
  30. An intriguing discussion is definitely worth comment.
    I do believe that you should publish more on this topic, it might
    not be a taboo subject but typically people do not speak about these issues.

    To the next! All the best!!

    回复
  31. I do agree with all of the ideas you have offered in your post.
    They are very convincing and can certainly work.

    Still, the posts are too short for beginners. Could
    you please lengthen them a little from subsequent time?

    Thank you for the post.

    回复
  32. Pretty! This was a really wonderful article.
    Thanks for supplying these details.

    回复
  33. Hello just wanted to give you a quick heads up. The words in your article seem
    to be running off the screen in Opera. I’m not sure if this is a format issue or something to do with browser compatibility but I figured I’d post to let you know.
    The style and design look great though! Hope you
    get the issue solved soon. Thanks

    回复
  34. Hello i am kavin, its my first occasion to commenting anywhere,
    when i read this paragraph i thought i could also make
    comment due to this sensible post.

    回复
  35. This is very attention-grabbing, You’re an overly professional blogger.

    I’ve joined your rss feed and sit up for in quest of more of your wonderful post.

    Additionally, I have shared your site in my social networks

    回复
  36. Way cool! Some extremely valid points! I appreciate you penning this post and the
    rest of the website is extremely good.

    回复
  37. It’s fantastic that you are getting thoughts from this post
    as well as from our dialogue made here.

    回复
  38. Hi there! I could have sworn I’ve visited this blog before
    but after browsing through a few of the posts I realized it’s new to
    me. Anyhow, I’m certainly pleased I stumbled upon it and I’ll be bookmarking it
    and checking back regularly!

    回复
  39. Magnificent beat ! I wish to apprentice whilst you amend your website, how can i subscribe for a blog website?
    The account aided me a applicable deal. I were tiny bit acquainted of this your broadcast offered vibrant transparent idea

    回复
  40. Hi there, just became alert to your blog through Google, and
    found that it is really informative. I am gonna watch out for brussels.
    I will be grateful if you continue this in future.

    A lot of people will be benefited from your
    writing. Cheers!

    回复
  41. pfizer is tablet

    4a57 is 25 mg pills

    回复
  42. viagra generic japan

    回复
  43. reputable online is

    回复
  44. women taking is reviews

    70e5 t make is

    回复

发表评论

电子邮件地址不会被公开。 必填项已用*标注