Django salt arrangement

Django salt arrangement

Postby Jenny_V » Sat Sep 10, 2016 8:35 pm

Reposting this because my old post was included with this one, just to be clear this is still an issue for me:

I have a django project that works with saltapi.
I have a url that is named minions_info that communicates with minions_info Module in
here is my output when I access localhost:

{"return": [{"": {"SwapTotal": {"value": "5603320", "unit": "kB"}, "SwapFree": {"value": "5603204", "unit": "kB"}, "MemFree": {"value": "481440", "unit": "kB"}, "HighTotal": {"value": "2664744", "unit": "kB"}, "HugePages_Rsvd": {"value": "0"}, "Committed_AS": {"value": "557872", "unit": "kB"}, "NFS_Unstable": {"value": "0", "unit": "kB"}, "Writeback": {"value": "0", "unit": "kB"}, "MemTotal": {"value": "3543716", "unit": "kB"}, "VmallocUsed": {"value": "9060", "unit": "kB"}, "HugePages_Free": {"value": "0"}, "Inactive": {"value": "458668", "unit": "kB"}, "Active": {"value": "2384836", "unit": "kB"}, "CommitLimit": {"value": "7375176", "unit": "kB"}, "Hugepagesize": {"value": "4096", "unit": "kB"}, "Cached": {"value": "2338492", "unit": "kB"}, "SwapCached": {"value": "0", "unit": "kB"}, "LowTotal": {"value": "878972", "unit": "kB"}, "Dirty": {"value": "408", "unit": "kB"}, "Mapped": {"value": "30716", "unit": "kB"}, "HighFree": {"value": "147128", "unit": "kB"}, "LowFree": {"value": "334312", "unit": "kB"}, "VmallocTotal": {"value": "114680", "unit": "kB"}, "Bounce": {"value": "0", "unit": "kB"}, "AnonPages": {"value": "167064", "unit": "kB"}, "PageTables": {"value": "5636", "unit": "kB"}, "HugePages_Total": {"value": "0"}, "Slab": {"value": "200720", "unit": "kB"}, "Buffers": {"value": "337880", "unit": "kB"}, "VmallocChunk": {"value": "104752", "unit": "kB"}}, "": {"SwapTotal":

I would like to take that info(which holds pillar info) into a table where I would be able to see the server name in the rows and some of the pillar information on the columns so that every row would eventually show all server info(mem,cpu etc.) in this case I'd like to take MemFree from each server(just the value).

Question is, how do I take it and show it in a nice looking table?

here is how my module in looks like
Code: Select all
  def minions_info(request):
ret = client.low([{'client': ' local', 'tgt': tgt, 'fun' : ' status.meminfo', 'timeout': '2'}])
return JsonResponse(ret)

Any help would be appreciated!

Posts: 7
Joined: Wed Jul 20, 2016 5:30 am

Return to Web Development

Who is online

Users browsing this forum: No registered users and 1 guest