I'm teaching myself OO programing in 57 very hard lessons, I'm stuck and would be pathetically grateful for some help.
I'm trying to improve Big Brother's network monitoring system by creating a hierarchial reporting/alerting scheme. Currently, bigbro treats all events individually without context, sending alerts when one of the monitored device or device's service dies. For example, take the following scenario:
hub-router -> branch-router -> branch-server -> branch-email
If branch-router goes down, branch-server and branch-email also go down because bigbro can't see them anymore, it being located closer to the hub. Thus 3 alerts potentially go out, but really only one should be sent.
Now, I have written enough so I can create objects and retreive properties - ie
print $node->statusand I've got inheritance working so I can determine the status of a node's parent, but now I'd like to use a hash in the object to store and retreive the status of specific services for a node, say:
%smtp = (timeChanged=>99999999, status=>re)
The idea is so I can
print $node->$smtp{status}
Can anyone point me in the right direction?
In reply to hash as an object property by dhammaBum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |