EcoStruxure IT forum
Schneider Electric support forum about installation and configuration for DCIM including EcoStruxure IT Expert, IT Advisor, Data Center Expert, and NetBotz
Link copied. Please paste this link to share this article on your social media post.
Posted: β2020-07-03 02:09 AM . Last Modified: β2024-04-09 12:22 AM
Hi All
We are trying to configure a Notification Policy to do a HTTP Post.
We have this in the Target URL of the Policy:
http://10.*.*.*/struxureware_dce.php AlertPod=${ALERTPOD} UserDesc=${USERDESC} SensorName=${SENSORNAME} SensorVal=${SENSORVAL} Time=${TIME} Date=${DATE}
We can see the above request hitting the web-server we are using, however the variables are not in the expected format for a post request.
What format are people using to successfully send requests? Like the above? Or like this?
http://10.*.*.*/struxureware_dce.php?AlertPod=${ALERTPOD}&UserDesc=${USERDESC}&SensorName=${SENSORNAME}&SensorVal=${SENSORVAL}&Time=${TIME}&Date=${DATE}
We dont have a firewall in the way. Unfortunately there are no examples in the documentation.
Thanks
(CID:105471662)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: β2020-07-03 02:09 AM . Last Modified: β2024-04-09 12:22 AM
Hi T. Prudden,
Unfortunately the Macros, such as ${ALERTPOD}, are only available when using "Send Short Message E-Mail" or "Send Data to FTP Server" alert actions.
With Send Short Message E-Mail you have the most flexibility with the Macros to dynamically define the Subject and Message. With Send Data to FTP Server you can use the Macros to dynamically define the name of the file that will be posted.
What you're trying to do is a great idea, I'm surprised more people haven't requested this functionality. My apologies that the documentation wasn't clear enough on which actions supported the Macros.
-Scott
(CID:105472131)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: β2020-07-03 02:09 AM . Last Modified: β2024-04-09 12:22 AM
Hi T. Prudden, thanks for posting! Let's see who can be of assistance here. Meanwhile. @community - any ideas? Best, Stine
(CID:105471969)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: β2020-07-03 02:09 AM . Last Modified: β2024-04-09 12:22 AM
Hi T. Prudden,
Unfortunately the Macros, such as ${ALERTPOD}, are only available when using "Send Short Message E-Mail" or "Send Data to FTP Server" alert actions.
With Send Short Message E-Mail you have the most flexibility with the Macros to dynamically define the Subject and Message. With Send Data to FTP Server you can use the Macros to dynamically define the name of the file that will be posted.
What you're trying to do is a great idea, I'm surprised more people haven't requested this functionality. My apologies that the documentation wasn't clear enough on which actions supported the Macros.
-Scott
(CID:105472131)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: β2020-07-03 02:09 AM . Last Modified: β2024-04-09 12:22 AM
Thanks for the reply.
(CID:105474266)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: β2020-07-03 02:09 AM . Last Modified: β2024-04-09 12:22 AM
Just to add to the above, I have been investigating further since posting my question, and when I examine the Apache access_log file I can see that I am in fact being sent the expanded macros (encoded), but just not in the HTTP post body. Example line from Apache access log:
10.*.*.* - hpom [27/Apr/2016:09:33:05 +0100] "POST /struxureware_dce.php AlertPod=SLO%2DDC1%2DPH%2DF07%2810%2E255%2E192%2E61%29 UserDesc= SensorName=Rear%5FTemp%20Temperature%20Value SensorVal=31%2E1%20%D2%B0%20C Time=09%2D33%2D02 Date=2016%2D04%2D27 HTTP/1.1" 200 24 "-" "-"
As a tempoary solution I think we will just scrape the data from the access logs for now.
Thanks for your help.
(CID:105474268)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: β2020-07-03 02:09 AM . Last Modified: β2024-04-09 12:22 AM
FYI as of PHP version 5 for whatever reason the additional information makes its way into the $_SERVER["SERVER_PROTOCOL"] variable (that's the $_SERVER superglobal). This appears as a idiosyncratic 'bug' in how PHP 5 parses the HTTP request header so probably not reliable across PHP and/or StruxureWare versions (it might be 'fixed' in newer versions, PHP 7 for example). I've not tested further, YMMV.
(CID:106205980)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: β2020-07-03 02:09 AM . Last Modified: β2023-10-31 10:21 PM
This question is closed for comments. You're welcome to start a new topic if you have further comments on this issue.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.