Project and Portfolio Management Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

How to get the Hostname token

SOLVED
Go to Solution
Valued Contributor

How to get the Hostname token

Hi,

 

Is there any token which gives me the hostname where the PPM is installed?

Just the server name.

I've found something as [AS.BASE_URL], but this gives me the URL (hostname+port+init_page)

 

Any help is appreciated

 

Regards

T.M.

 

6 REPLIES
Honored Contributor [Founder]

Re: How to get the Hostname token

[AS.SERVER_NAME] ?

Valued Contributor

Re: How to get the Hostname token

[ Edited ]

Thanks,

 

But, it is node name not the hostname.

I've gone through most of the application tokens, but no good.

Maybe, there is no such a token or I might be missing.

 

Honored Contributor [Founder]

Re: How to get the Hostname token

T.M.,

You should have an Environment defined for your PPM environment, usually called KINTANA_SERVER. If that's properly configured, you can get use [ENV="KINTANA_SERVER".SERVER_NAME].
Honored Contributor [Founder]

Re: How to get the Hostname token

Another approach would be to ask the server what its name is. Something like this should work:

 

ksc_local_exec hostname

 

I am assuming here that you are running nodes on more than one server and the kintana_server environment lists only the primary node.

Frequent Advisor

Re: How to get the Hostname token

[ Edited ]

I have found the same issue in clustered enviornments.

 

Perhaps you can try this if you are using a command line: 

 

ksc_itg_run_sql QUERY_STRING="SELECT VALUE  FROM knta_app_server_properties WHERE KEY = 'PRIMARY_BASE_URL''"

Use SUBSTR for exact host name

and then use [SQL_OUTPUT] token to fetch the value via token. 

 

Alternatively, you can also try 'localhost' like http://localhost:[AS.HTTP_PORT] in a ksc_local_exec command

 

 

Thanks, 

Kuldeep

Valued Contributor

Re: How to get the Hostname token

Thanks all,

 

Since I am going to use it in mails, only token solution is the remedy.

If I use [ENV="SERVERNAME IN ENVONMENT".SERVER_NAME] solves my problem.

 

Regards

T.M.