Hi,
Could I request that this trivial change be added at some stage please. It introduces the ability to include a tag in hosts.cfg which has no purpose other than provide an arbitary reference. eg
configdbid=12345
In my case '12345' would be the ID of a record in an asset database and I can use this to construct a query that delivers useful support information. It could also be used the other way round and provide a way to maintain hosts.cfg in a mysql db or some such. Let me know what you think.
*** xymon-code/lib/loadhosts.h.FCS 2014-01-10 11:29:26.000000000 +0000 --- xymon-code/lib/loadhosts.h 2014-01-10 14:00:51.000000000 +0000
*** 55,60 **** --- 55,61 ---- XMH_FLAG_PULLDATA, XMH_FLAG_MULTIHOMED, XMH_LDAPLOGIN,
*** xymon-code/lib/loadhosts.c.FCS 2014-01-10 11:29:26.000000000 +0000 --- xymon-code/lib/loadhosts.c 2014-01-10 14:00:42.000000000 +0000XMH_CONFIGDBID, XMH_IP, XMH_HOSTNAME, XMH_DOCURL,
*** 170,175 **** --- 170,177 ---- xmh_item_name[XMH_FLAG_MULTIHOMED] = "XMH_MULTIHOMED"; xmh_item_key[XMH_LDAPLOGIN] = "ldaplogin="; xmh_item_name[XMH_LDAPLOGIN] = "XMH_LDAPLOGIN";
xmh_item_key[XMH_CONFIGDBID] = "configdbid=";
*** xymon-code/web/svcstatus-info.c.FCS 2014-01-10 11:30:24.000000000 +0000 --- xymon-code/web/svcstatus-info.c 2014-01-10 14:01:27.000000000 +0000xmh_item_name[XMH_CONFIGDBID] = "XMH_CONFIGDBID"; xmh_item_key[XMH_CLASS] = "CLASS:"; xmh_item_name[XMH_CLASS] = "XMH_CLASS"; xmh_item_key[XMH_OS] = "OS:";
*** 1206,1211 **** --- 1206,1212 ---- (strncmp(val, "type=", 5) == 0) || (strncmp(val, "post=", 5) == 0) || (strncmp(val, "nopost=", 7) == 0) ||
(strncmp(val, "configdbid=", 11) != 0) && (strncmp(val, "soap=", 5) == 0) || (strncmp(val, "nosoap=", 7) == 0) ) {
Thanks
Andy
Den 10-01-2014 15:15, Andy Smith skrev:
Hi,
Could I request that this trivial change be added at some stage please. It introduces the ability to include a tag in hosts.cfg which has no purpose other than provide an arbitary reference. eg
configdbid=12345
In my case '12345' would be the ID of a record in an asset database and I can use this to construct a query that delivers useful support information. It could also be used the other way round and provide a way to maintain hosts.cfg in a mysql db or some such. Let me know what you think.
Hmm ... hostnames are supposed to be a unique id for the servers in hosts.cfg - why can't you use that?
Regards, Henrik
On Fri, Jan 10, 2014 at 10:37 AM, Henrik Størner <henrik at hswn.dk> wrote:
Den 10-01-2014 15:15, Andy Smith skrev:
Hi,
Could I request that this trivial change be added at some stage please. It introduces the ability to include a tag in hosts.cfg which has no purpose other than provide an arbitary reference. eg
configdbid=12345
In my case '12345' would be the ID of a record in an asset database and I can use this to construct a query that delivers useful support information. It could also be used the other way round and provide a way to maintain hosts.cfg in a mysql db or some such. Let me know what you think.
Hmm ... hostnames are supposed to be a unique id for the servers in hosts.cfg - why can't you use that?
I am in similar situation with Andy. but I am looking a quick way to link to other asset systems that doesn't use "asset name" but "asset id" for searching.
My asset system has a web interface as http://test.com/hostinfo?host=DatabaseID to display the asset information of a hostname using numeric ID. My current approach is to use hostinfo.csv + bit of code changes(R1) to provide a one click away reach other data sources (like IBM BigFix, Ticket System, Puppet ...).
R1: http://sourceforge.net/mailarchive/forum.php?thread_name=CAD2GW8rWdKp3MgF-R%...
May be above quick/easy hack will work for Andy's case. But this hack ditch the original purpose of hostinfo.csv.
I am hoping the asset URL link can be in "info" column as a clickable tag/link. this approach will save me some explanation on how to get to a xymon host's other information.
tj
Regards, Henrik
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
-- T.J. Yang
On 1/10/2014 8:24 AM, T.J. Yang wrote:
- snip -
- snip -
I am hoping the asset URL link can be in "info" column as a clickable tag/link.
I am in similar situation with Andy. but I am looking a quick way to link to other asset systems that doesn't use "asset name" but "asset id" for searching.
The unique hostname isn't directly accessible for links on the 'info' page, but it can be had in a round-about way. I embed HTML in the DESCR field to provide this external linkage on the 'info' page of Xymon. Like this:
DESCR:"Router:<a href=/xymon/extnotes/legacynotes.php target=_blank >Legacy Notes</a>"
My legacynotes.php looks in $_SERVER['HTTP_REFERER'] to find the parameter 'HOST=foo.bar.com' which it then uses to craft an appropriate 302 message sending the customer to an external application. If the external ID for your application were in the hosts.cfg in an arbitrary (ignored) tag, the php could pull it out and use it to craft an appropriate 302.
-- Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Enterprise Technology Services Department of Administration State of Alaska
On 1/10/2014 5:15 AM, Andy Smith wrote:
Could I request that this trivial change be added at some stage please. It introduces the ability to include a tag in hosts.cfg which has no purpose other than provide an arbitary reference. eg
configdbid=12345
I don't understand the request. Isn't this function already here? I do this now with tags I've introduced into the hosts.cfg files for outside reference or ext scripts.
If you append the following to the end of a host line: configdbid:12345 don't you get exactly the behavior you seek? (Provided configdbid is not defined in protocols.cfg)
-- Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Enterprise Technology Services Department of Administration State of Alaska
Hi John
Thanks for the pointer.
On Fri, Jan 10, 2014 at 11:11 AM, John Thurston <john.thurston at alaska.gov>wrote:
On 1/10/2014 5:15 AM, Andy Smith wrote:
Could I request that this trivial change be added at some stage please. It introduces the ability to include a tag in hosts.cfg which has no purpose other than provide an arbitary reference. eg
configdbid=12345
I don't understand the request. Isn't this function already here? I do this now with tags I've introduced into the hosts.cfg files for outside reference or ext scripts.
I did a quick test on my xymon server, configdbid=12345 did show up under "Other tags:".
Andy, is above result is what you need ?
Regards
tj
If you append the following to the end of a host line: configdbid:12345 don't you get exactly the behavior you seek? (Provided configdbid is not defined in protocols.cfg)
-- Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Enterprise Technology Services Department of Administration State of Alaska
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
-- T.J. Yang
participants (4)
-
abs@shadymint.com
-
henrik@hswn.dk
-
john.thurston@alaska.gov
-
tjyang2001@gmail.com