planet4
(Fredrik)
November 9, 2023, 8:10am
1
I was wondering if someone has been able to get this up and running and if so can provide an image how it looks. I do get an error after activating it.
Some GUI extensions could not be loaded. This may be caused by some incompatible extension packages.
Loading “wato/m365_service_health” failed: cannot import name ‘RulespecGroupVMCloudContainer’ from ‘cmk.gui.plugins.wato.datasource_programs’ (/omd/sites/white/lib/python3/cmk/gui/plugins/wato/datasource_programs.py)
https://exchange.checkmk.com/p/m365-service-health
gstolz
(Gerd Stolz)
November 9, 2023, 8:25am
2
Hi @planet4 ,
what Checkmk version are you using? Maybe I need to tweak the mkp
Gerd
planet4
(Fredrik)
November 9, 2023, 8:29am
3
Latest. Just upgraded today. 2.2.0p14
gstolz
(Gerd Stolz)
November 10, 2023, 9:20am
4
hm ok - I think the mkp simply wasn’t adapted for 2.2 yet… I’ll hopefully find time on monday to fix this, thanks for the info
1 Like
gstolz
(Gerd Stolz)
November 29, 2023, 5:50am
5
Sorry for taking so long, it’s such a minor (1 import) change, but anyhow… fix for 2.2 is available upload to exchange.checkmk.com pending
m365_service_health-1.2.1.mkp (5.4 KB)
planet4
(Fredrik)
November 29, 2023, 11:19am
6
Thanks. Seems to work. Added the mkp and configured tennant/secret etc. But not really sure what should happen. Should they appear in the assiged host as a service?
gstolz
(Gerd Stolz)
November 29, 2023, 11:23am
7
Hi @planet4 ,
yes, if you have the rule assigned to a host + the host is configured to use API configuration in the “Checkmk agent / API integrations” tag, then you should discover around 37 new services
Gerd
planet4
(Fredrik)
November 29, 2023, 11:39am
8
Strange. Added a new dummy host now but get:
[special_m365_service_health]: TypeError: int() argument must be a string, a bytes-like object or a real number, not ‘NoneType’
gstolz
(Gerd Stolz)
November 29, 2023, 1:19pm
9
can you run the special agent from the cli to get the full error? You can get the CLI by running
“cmk -D <host_you_assigned_the_checks_to> | head -n 15”
when sharing the output, please make sure to obfuscate your secrets
planet4
(Fredrik)
November 29, 2023, 1:31pm
10
I got this. I am running the appliance.
O365
Addresses: 0.0.0.0
Tags: [address_family:ip-v4-only], [agent:cmk-agent], [criticality:prod], [networking:lan], [piggyback:auto-piggyback], [site:white], [snmp_ds:no-snmp]
Labels: [cmk/site:white]
Host groups: check_mk
Contact groups:
Agent mode: No agent
Type of agent:
Process piggyback data from /omd/sites/white/tmp/check_mk/piggyback/O365
PING only
Services:
checktype item params description groups
--------- ---- ------ ----------- ------
OMD[white]:~$
gstolz
(Gerd Stolz)
November 29, 2023, 1:34pm
11
I think something went wrong, is “O365” (case sensitive) the actual host name in checkmk? than you should see a proper line including “special/agent_m365_service_health” under “Type of agent”
planet4
(Fredrik)
November 29, 2023, 1:37pm
12
Sorry. Did a typing error. It looks like this.
M365
Addresses: 127.0.0.1
Tags: [Deployment:Production], [Hosttype:Server], [Location:Azure], [address_family:ip-v4-only], [agent:special-agents], [criticality:prod], [hostinfo:Unknown], [ip-v4:ip-v4], [networking:lan], [piggyback:auto-piggyback], [platform:nothing], [site:white], [snmp_ds:no-snmp], [tcp:tcp], [virtual:No]
Labels: [cmk/site:white]
Parents: CLOUD
Host groups: Azure, Whitearkitekter
Contact groups: tod, all
Agent mode: No Checkmk agent, all configured special agents
Type of agent:
Program: /omd/sites/white/local/share/check_mk/agents/special/agent_m365_service_health --tenant xxxxxxxxxxxxxxxxxxxxxx --client xxxxxxxxxxxxxxxxxxxxxx '--secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
Process piggyback data from /omd/sites/white/tmp/check_mk/piggyback/M365
Services:
checktype item params description groups
--------- ---- ------ ----------- ------
OMD[white]:~$
gstolz
(Gerd Stolz)
November 29, 2023, 2:51pm
13
I might have made a little GUI config error and have not flagged the option “Number of days to look back for old issue messages” as mandatory - can you set a value for that and see if that helps? (currently on the road and can’t reproduce it.)
planet4
(Fredrik)
January 3, 2024, 1:35pm
14
Long time now but was just able to test this again. I changed number of days but still do not get any usefull info.
OMD[white]:~$ cmk -D M365 | head -n 15
M365
Addresses: 127.0.0.1
Tags: [Deployment:Production], [Hosttype:Server], [Location:Azure], [address_family:ip-v4-only], [agent:special-agents], [criticality:prod], [hostinfo:Unknown], [ip-v4:ip-v4], [networking:lan], [piggyback:auto-piggyback], [platform:nothing], [site:white], [snmp_ds:no-snmp], [tcp:tcp], [virtual:No]
Labels: [cmk/site:white]
Parents: CLOUD
Host groups: Azure, Whitearkitekter
Contact groups: all, tod
Agent mode: No Checkmk agent, all configured special agents
Type of agent:
Program: /omd/sites/white/local/share/check_mk/agents/special/agent_m365_service_health --tenant xxxxxxxxxxxxxxxxx --client xxxxxxxxxxxxxxxxx --issue_days 15 '--secret=xxxxxxxxxxxxxx'
Process piggyback data from /omd/sites/white/tmp/check_mk/piggyback/M365
Services:
checktype item params description groups
--------- ---- ------ ----------- ------
relo1
(rebentaler)
April 4, 2024, 10:13am
15
@planet4 Did you find a solution? I have the same issue…
using checkmk v.2.1.0p40
tested with extension v.1.1.0 and v.1.2.1
M365
Addresses: 127.0.0.1
Tags: [address_family:ip-v4-only], [agent:special-agents], [criticality:prod], [eskalation:none], [ip-v4:ip-v4], [networking:lan], [piggyback:auto-piggyback], [site:black], [snmp_ds:no-snmp], [tcp:tcp]
Labels: [cmk/site:black]
Host groups: check_mk
Contact groups: check-mk-notify, all
Agent mode: No Checkmk agent, all configured special agents
Type of agent:
Program: /omd/sites/black/local/share/check_mk/agents/special/agent_m365_service_health ‘–tenant’ ‘X’ ‘–client’ ‘X’ ‘–issue_days’ 11 ‘–secret=X’
Process piggyback data from /omd/sites/black/tmp/check_mk/piggyback/M365
Services:
checktype item params description groups
relo1
(rebentaler)
April 4, 2024, 11:58am
16
Found the solution.
in app registration → API permissions:
Add ServiceHealth.Read.All
1 Like
system
(system)
Closed
April 4, 2025, 11:59am
17
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.