- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- Re: How to set instance.statusMessage
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 06:45 PM
02-18-2025 06:45 PM
Is there a way to add our own instance messageStatus? I see in the email template for provisioning complete:
{{#if instance.statusMessage}}
<p>{{instance.statusMessage}}</p>
{{/if}}
If I could run a shell script in the workflow to add our custom provisioning message then the template would not need customized. I would like to be able to set the value of instance.statusMessage in a provisoning workflow so when completed successfully I could have the default template send an email with the message body including something like, “Please wait 10 minutes for the system reconfiguration to complete”
Solved! Go to Solution.
- Tags:
- instances
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 01:18 AM
02-20-2025 01:18 AM
Re: How to set instance.statusMessage
That could be the case. If you can, please post up your full script and state in which phase it is running. No promises, but someone may be able to test/validate the script when get a moment.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 05:38 PM
02-19-2025 05:38 PM
Re: How to set instance.statusMessage
I created a Python automation script with the simple code below:
morpheus['instance']['statusMessage'] = "The instance will restart in 15 minutes after the puppet configuration has completed"
And when that is set the workflow is complete but the statusMessage has nothing extra. I dumped all the python vars and I see instance.server.statusMessage = null.
But when i try and set the value in Automation using morpheus.instance.server.statusMessage I get an error in the script. If i correct and complete the automation step I get a message, but it’s the same error on the Provisioning History (below). My guess is “statusMessage” for the instance is something only morpheus can touch, so we’ll just extend the email template and look for the OS instance; and if it is RHEL to include our puppet message for the pending satellite configuration steps.
Error
Traceback (most recent call last): File “”, line 5, in KeyError: ‘server’
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 01:14 AM
02-19-2025 01:14 AM
Re: How to set instance.statusMessage
Hi,
It’s possible to alter morpheus vars via script. Typical examples could be changing things like instance name and hostname, and usually during the config phase since this phase allows data to be modified that is passed to the provisioning job
You could try setting it in that phase, but I’d caveat that. It may be something updated when provisioning is complete or failed. You may need to use provision or post-provision phase, and even then it would depend on whether the email is sent, prior to workflows in those phases being executed
One to test.
To help, this script in Python, should give you enough info to create a task & provisioning workflow to test your ability to update that variable prior to the email getting sent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 05:53 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2025 07:09 AM
02-22-2025 07:09 AM
Re: How to set instance.statusMessage
That is amazing. I did not make the connection with the new spec. I’m trying it on our environment but I think I’m working through some other issues. When I put this script in config mode workflow I could not provision new instances.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 06:33 AM
02-19-2025 06:33 AM
Re: How to set instance.statusMessage
Thank you for the link and pointer. I can from the example a good start for connecting back to the Morpheus API with the instance token. I will need to dig through the documentation to see where the instance endpoint exists and see if I can set that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 06:48 AM
02-19-2025 06:48 AM
Re: How to set instance.statusMessage
Ignore that piece (lines 19 - 40), it’s not needed for what you want to achieve.