(Workaround) JSON returned from ME Web Administration AJAX servlet *is not valid*

Raise/discuss any potential issues with MailEnable for consideration in project issue register.
Post Reply
Maranda
Posts: 27
Joined: Mon Dec 11, 2017 8:10 pm

(Workaround) JSON returned from ME Web Administration AJAX servlet *is not valid*

Post by Maranda »

I think I reported this plenty of times now, although it being trivial to fix it hasn't even been acknowledged. So here I go again.
The web administration AJAX servlet (Mondo/Servlet/request.aspx?Cmd=GET-SYSTEM-MONITORS&Format=JSON) for Monitoring-Summary/Monitor-Details counters is returning invalid and RFC 4627 uncompliant JSON, example:

Code: Select all

{
	"Counters": {
		"SystemMemoryAvailable": {
			"Labels": [1517611981, 1517612004, 1517612026, 1517612047],
			"Values": [3709, 3685, 3668, 3655],
			"Title": "Memory Available MBytes"
		},
		"PhysicalDiskAvgQueueLength": {
			"Labels": [1517611983, 1517612005, 1517612027, 1517612048],
			"Values": [0, 000772728293668479, 0, 00249992799945176, 0, 0, 000500497641041875],
			"Title": "PhysicalDisk Avg. Disk sec/Transfer-_Total"
		},
		"IMAPServiceMemory": {
			"Labels": [1517611984, 1517612006, 1517612028, 1517612049],
			"Values": [22380544, 22380544, 22380544, 22380544],
			"Title": "Process Working Set-MEIMAPS"
		},
		"IMAPServiceProcessor": {
			"Labels": [1517611985, 1517612007, 1517612029, 1517612050],
			"Values": [0, 0, 0, 0],
			"MaxValue": "100",
			"formatStringY": "%#d",
			"Title": "Process % Processor Time-MEIMAPS"
		},
		"SMTPConnectorMemory": {
			"Labels": [1517611986, 1517612008, 1517612030, 1517612051],
			"Values": [4588544, 4588544, 4580352, 4580352],
			"Title": "Process Working Set-MESMTPC"
		},
		"SMTPConnectorProcessor": {
			"Labels": [1517611987, 1517612009, 1517612031, 1517612053],
			"Values": [0, 0, 0, 0],
			"MaxValue": "100",
			"formatStringY": "%#d",
			"Title": "Process % Processor Time-MESMTPC"
		},
		"MailTransferAgentMemory": {
			"Labels": [1517611988, 1517612010, 1517612032, 1517612054],
			"Values": [3458048, 3458048, 3458048, 3458048],
			"Title": "Process Working Set-MEMTA"
		},
		"MailTransferAgentProcessor": {
			"Labels": [1517611989, 1517612011, 1517612033, 1517612055],
			"Values": [0, 0, 0, 0],
			"MaxValue": "100",
			"formatStringY": "%#d",
			"Title": "Process % Processor Time-MEMTA"
		},
		"PostofficeConnectorMemory": {
			"Labels": [1517611990, 1517612012, 1517612034, 1517612056],
			"Values": [1771520, 1771520, 1771520, 1771520],
			"Title": "Process Working Set-MEPOC"
		},
		"PostofficeConnectorProcessor": {
			"Labels": [1517611991, 1517612013, 1517612035, 1517612057],
			"Values": [0, 0, 0, 0],
			"MaxValue": "100",
			"formatStringY": "%#d",
			"Title": "Process % Processor Time-MEPOC"
		},
		"POPServiceMemory": {
			"Labels": [1517611993, 1517612014, 1517612036, 1517612058],
			"Values": [7101440, 7101440, 7101440, 7101440],
			"Title": "Process Working Set-MEPOPS"
		},
		"POPServiceProcessor": {
			"Labels": [1517611994, 1517612015, 1517612037, 1517612059],
			"Values": [0, 0, 0, 0],
			"MaxValue": "100",
			"formatStringY": "%#d",
			"Title": "Process % Processor Time-MEPOPS"
		},
		"IndexingServiceMemory": {
			"Labels": [1517611995, 1517612016, 1517612038, 1517612060],
			"Values": [11085824, 11085824, 11085824, 11085824],
			"Title": "Process Working Set-MEMIS"
		},
		"IndexingServiceProcessor": {
			"Labels": [1517611996, 1517612017, 1517612039, 1517612061],
			"Values": [0, 0, 0, 0],
			"MaxValue": "100",
			"formatStringY": "%#d",
			"Title": "Process % Processor Time-MEMIS"
		},
		"MigrationServiceMemory": {
			"Labels": [1517611997, 1517612018, 1517612040, 1517612062],
			"Values": [6730752, 6725632, 6725632, 6730752],
			"Title": "Process Working Set-MEDMS"
		},
		"MigrationServiceProcessor": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [0, 0, 0],
			"MaxValue": "100",
			"formatStringY": "%#d",
			"Title": "Process % Processor Time-MEDMS"
		},
		"IMAPConnections": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [3, 3, 3],
			"formatStringY": "%#d",
			"Title": "IMAP Connections"
		},
		"POPConnections": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [0, 0, 0],
			"NumTicksY": 1,
			"formatStringY": "%#d",
			"Title": "POP Connections"
		},
		"HTTPConnections": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [0, 0, 0],
			"NumTicksY": 1,
			"formatStringY": "%#d",
			"Title": "HTTP/EAS Service Connections"
		},
		"HTTPIISConnections": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [0, 0, 0],
			"NumTicksY": 1,
			"formatStringY": "%#d",
			"Title": "HTTP/EAS IIS Connections"
		},
		"SMTPInboundConnections": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [0, 0, 0],
			"NumTicksY": 1,
			"formatStringY": "%#d",
			"Title": "SMTP Inbound Connections"
		},
		"SMTPOutboundConnections": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [0, 0, 0],
			"NumTicksY": 1,
			"formatStringY": "%#d",
			"Title": "SMTP Outbound Connections"
		},
		"SMTPInboundQueueLengthDisplay": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [0, 0, 0],
			"NumTicksY": 1,
			"formatStringY": "%#d",
			"Title": "SMTP Inbound Messages Waiting for Processing"
		},
		"SMTPOutboundQueueLengthDisplay": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [0, 0, 0],
			"NumTicksY": 1,
			"formatStringY": "%#d",
			"Title": "Messages Waiting for External SMTP Delivery"
		},
		"PostofficeInboundQueueLengthDisplay": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [0, 0, 0],
			"NumTicksY": 1,
			"formatStringY": "%#d",
			"Title": "WebMail/EAS Messages Waiting for Delivery"
		},
		"PostofficeOutboundQueueLengthDisplay": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [0, 0, 0],
			"NumTicksY": 1,
			"formatStringY": "%#d",
			"Title": "Messages Waiting for Message Store Delivery"
		},
		"ListInboundQueueLengthDisplay": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [0, 0, 0],
			"NumTicksY": 1,
			"formatStringY": "%#d",
			"Title": "List Server Messages Waiting for Delivery"
		},
		"ListOutboundQueueLengthDisplay": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [0, 0, 0],
			"NumTicksY": 1,
			"formatStringY": "%#d",
			"Title": "Messages Waiting for List Server Processing"
		},
		"Greylisting": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [287, 287, 287],
			"formatStringY": "%#d",
			"Title": "Greylist Message Detections"
		},
		"DNSBlacklist": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [100, 100, 100],
			"formatStringY": "%#d",
			"Title": "RDNS Messages Detected"
		},
		"PTRRecord": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [82, 82, 82],
			"formatStringY": "%#d",
			"Title": "PTR Missing Detections"
		},
		"SPF": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [88, 88, 88],
			"formatStringY": "%#d",
			"Title": "SPF Detections"
		},
		"URLBlacklist": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [0, 0, 0],
			"NumTicksY": 1,
			"formatStringY": "%#d",
			"Title": "XBL Message Detections"
		},
		"Antivirus": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [1, 1, 1],
			"NumTicksY": 1,
			"formatStringY": "%#d",
			"Title": "Antivirus Detected"
		},
		"Bayesian": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [104, 104, 104],
			"formatStringY": "%#d",
			"Title": "Bayesian Detections"
		},
		"DKIM": {
			"Labels": [1517611998, 1517612020, 1517612041],
			"Values": [73, 73, 73],
			"formatStringY": "%#d",
			"Title": "DKIM Detections"
		}
	}
}
PhysicalDiskAvgQueueLength values are not valid digit tokens according to the spec, they should be:

Code: Select all

		"PhysicalDiskAvgQueueLength": {
			"Labels": [1517611983, 1517612005, 1517612027, 1517612048],
			"Values": [0, 0.00772728293668479, 0, 0.0249992799945176, 0, 0, 0.00500497641041875],
			"Title": "PhysicalDisk Avg. Disk sec/Transfer-_Total"
		},
This breaks graphs with any browser that does strict JSON assertions (e.g. all latest Gecko based like Edge, Firefox, Safari etc)
Last edited by Maranda on Thu May 17, 2018 7:50 am, edited 1 time in total.

Maranda
Posts: 27
Joined: Mon Dec 11, 2017 8:10 pm

Re: JSON returned from ME Web Administration AJAX servlet *is not valid*

Post by Maranda »

Still not fixed in 10.14...

Maranda
Posts: 27
Joined: Mon Dec 11, 2017 8:10 pm

Re: JSON returned from ME Web Administration AJAX servlet *is not valid*

Post by Maranda »

10.15 and not fixed.

Brett Rowbotham
Posts: 560
Joined: Mon Nov 03, 2003 7:48 am
Location: Cape Town

Re: JSON returned from ME Web Administration AJAX servlet *is not valid*

Post by Brett Rowbotham »

Rather post a support request with a Defect category at https://www.mailenable.com/support.asp. You get much better response from official channels.

Cheers,
Brett

Maranda
Posts: 27
Joined: Mon Dec 11, 2017 8:10 pm

Re: JSON returned from ME Web Administration AJAX servlet *is not valid*

Post by Maranda »

Brett Rowbotham wrote:Rather post a support request with a Defect category at https://www.mailenable.com/support.asp. You get much better response from official channels.

Cheers,
Brett
Already done months ago, already ignored.

Bests.

Admin
Site Admin
Posts: 1127
Joined: Mon Jun 10, 2002 6:31 pm
Location: Melbourne, Victoria, Australia

Re: JSON returned from ME Web Administration AJAX servlet *is not valid*

Post by Admin »

Hi,

Yes, we had received the report, so it was passed through to the developers to check and fix. Unfortunately it just has not been addressed yet. I will ask them to prioritize it. To me it looks like the culture setting on the server it affecting it, since I don't get the error. I'll let you know as soon as the devs get to it.

Maranda
Posts: 27
Joined: Mon Dec 11, 2017 8:10 pm

Re: JSON returned from ME Web Administration AJAX servlet *is not valid*

Post by Maranda »

Admin wrote:Hi,

Yes, we had received the report, so it was passed through to the developers to check and fix. Unfortunately it just has not been addressed yet. I will ask them to prioritize it. To me it looks like the culture setting on the server it affecting it, since I don't get the error. I'll let you know as soon as the devs get to it.
Tested the fix in latest 10.16 beta and nothing changed. If it's really culture related this is the output of Get-Culture from the server:

Code: Select all

LCID             Name             DisplayName
----             ----             -----------
1040             it-IT            Italiano (Italia)
OS is Windows Server 2012 R2

Bests.

Maranda
Posts: 27
Joined: Mon Dec 11, 2017 8:10 pm

Re: (Workaround) JSON returned from ME Web Administration AJAX servlet *is not valid*

Post by Maranda »

This is fixed by explicitly setting culture to EN in web.config on a server that doesn't have EN as default culture setting:

Code: Select all

<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="en" />

Post Reply