Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Change color Icons

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map)
Author Message
eterzella.r.t
Cacti User


Joined: 25 Oct 2007
Posts: 65

PostPosted: Wed Dec 12, 2007 7:08 pm    Post subject: Change color Icons Reply with quote

Is there any way to show the weathermap when a host was down?

For example, changing the color of the image to red?
Back to top
chrisgapske
Cacti User


Joined: 22 May 2007
Posts: 268
Location: Padacuh, Ky-Alpena, MI-Gulf Shores,AL

PostPosted: Wed Dec 12, 2007 7:43 pm    Post subject: Reply with quote

Just want to see how this plays out.
Back to top
eterzella.r.t
Cacti User


Joined: 25 Oct 2007
Posts: 65

PostPosted: Wed Dec 12, 2007 10:33 pm    Post subject: Reply with quote

yes ...
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2167
Location: United Kingdom

PostPosted: Thu Dec 13, 2007 3:38 am    Post subject: Reply with quote

(you know you can just click 'Watch This Topic' at the bottom, right? )

As long as you trust Cacti to decide what host is down (I don't - I use other software for availability monitoring) then yes, it's easy.

It's discussed in this thread already, but here's the summary:

Code:


SCALE cactiupdown 0 0.5  192 192 192
SCALE cactiupdown 0.5 1.5 255 0 0
SCALE cactiupdown 1.5 2.5 0 0 255
SCALE cactiupdown 2.5 3.5 0 255 0

NODE myrouter
   POSITION 100 100
   LABEL My Router
   TARGET cactihost:22
   USESCALE cactiupdown in


So, the cactihost: target returns a number from 0 to 3 for disabled, down, recovering, or up, as the 'in' bandwidth value. The SCALE lines define a scale so that each of those is a different colour.

In the node, you use the cactihost: target with the hostid from Cacti - you can see this in the URL if you go to the Devices page and click on the device. Then you say to use the scale that you defined to look at the 'in' value and colour the node.

In 0.93 and newer, there is a cactimonitor: target too, that does the same thing with one extra state - 'thresholds failing' - so you can show devices that are "sick but not dead". Look up TARGETs in the config reference, and then look at the TARGET reference link there for more info.

If you want to use another source (e.g. Nagios) for the up/down info, then you need to do more work or write a plugin for weathermap. I intend to write some of those myself over the next few versions.
Back to top
llow
Cacti User


Joined: 05 Oct 2007
Posts: 88

PostPosted: Sat Dec 15, 2007 7:22 pm    Post subject: Reply with quote

Here is a preliminary nagios datasource addon I wipped up.

Right now will return the following
0 - statename: up
1 - statename: down
2 - statename: unreachable
3 - statename: warning (means services impaired but host up)
100 - statename: unknown

I populate the variable state with the number as well.

nagioshost: <nagios alias> as your target

You will need the ndodb under the cacti database for this to work out of the box.

Again this is alpha and just using as proof of concept right now.



WeatherMapDataSource_nagios.php.gz
 Description:

Download
 Filename:  WeatherMapDataSource_nagios.php.gz
 Filesize:  992 Bytes
 Downloaded:  74 Time(s)

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map) All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group