Comments (12)
It looks like you forgot to add the --api-secret <api-secret>
?
from check_opnsense.
no it did, just break befor all is copy pasted
have the information to be put between "" or <> or nothing?
my key are extremly long tooo
from check_opnsense.
a part of the error output (the line 15 is where the api-key is - )
[2018-07-26 18:50:29 +0200] critical/config: Error: syntax error, unexpected T_STRING_ANGLE
Location: in /etc/icinga2/conf.d/opnsense/opnsene-update.conf: 15:28-15:109
/etc/icinga2/conf.d/opnsense/opnsene-update.conf(13):
/etc/icinga2/conf.d/opnsense/opnsene-update.conf(14): vars.opnsense_host = "10.147.42.7"
/etc/icinga2/conf.d/opnsense/opnsene-update.conf(15): vars.opnsense_api-key = <gZY632BtFxwZrkQ
from check_opnsense.
You have to put the key and the secret between ". The < and > characters are part of the example string and shouldn't be part of your config.
from check_opnsense.
[2018-07-26 21:41:33 +0200] critical/config: Error: Expression cannot be assigned to.
Location: in /etc/icinga2/conf.d/opnsense/opnsene-update.conf: 15:1-15:109
/etc/icinga2/conf.d/opnsense/opnsene-update.conf(13):
/etc/icinga2/conf.d/opnsense/opnsene-update.conf(14): vars.opnsense_host = "10.147.42.7"
/etc/icinga2/conf.d/opnsense/opnsene-update.conf(15): vars.opnsense_api-key = "gZY632BtFxwZrkQ9wTVCx"
^^^^^^^^^^^^^^^^^^^^^^^^^
As you could see the " " is not helping either.
i cut a bit of the api-key code. The ^^^^^ starts just below the vars.opnsense
i just scarry i have a spelling mistake in it.
from check_opnsense.
Could you share your full config?
from check_opnsense.
1 object CheckCommand "check_opnsense-update" {
2
3 command = [ PluginCustomDir + "/opnsense/check_opnsense.py" ]
4
5 arguments = {
6 "-H" = "$opnsense_host$"
7 "--api-key" = "$opnsense_api-key$"
8 "--api-secret" = "$opnsense_api-secret$"
9 "-m" = "$opnsense_function$"
10 "-w" = "$opnsense_TRESHOLD_WARNING$"
11 "-c" = "$opnsense_TRESHOLD_CRITICAL$"
12 }
13
14 vars.opnsense_host = "10.147.42.7"
15vars.opnsense_api-key = "gZY632BtFxwZrkQ+mDxl8qsqirqDuFsrxCCe"
16vars.opnsense_api-secret = "Y0yi/QxfLYHLD807SSnKaL1K/uRqejMiR32vipUHglYg"
17 vars.opnsense_function = "updates"
18 }
Installed like this - http://wombat3.kozo.ch/j/icinga-list/9780-icinga2-add-opnsense
from check_opnsense.
The problem are your variable names: opnsense_api-key
and opnsense_api-secret
Change the minus to a underscore and everything should be fine:
object CheckCommand "check_opnsense-update" {
command = [ PluginCustomDir + "/opnsense/check_opnsense.py" ]
arguments = {
"-H" = "$opnsense_host$"
"--api-key" = "$opnsense_api_key$"
"--api-secret" = "$opnsense_api_secret$"
"-m" = "$opnsense_function$"
"-w" = "$opnsense_TRESHOLD_WARNING$"
"-c" = "$opnsense_TRESHOLD_CRITICAL$"
}
vars.opnsense_host = "10.147.42.7"
vars.opnsense_api_key = "gZY632BtFxwZrkQ+mDxl8qsqirqDuFsrxCCe"
vars.opnsense_api_secret = "Y0yi/QxfLYHLD807SSnKaL1K/uRqejMiR32vipUHglYg"
vars.opnsense_function = "updates"
}
from check_opnsense.
icinga2 daemon -C
gave no error - so this helped! will check the GUI tonight.
did the System get confused with --api-key and opnsense_api-key because the opnsense part where cut away?
Thanks a lot for your help
as next i will try the pve part ;-)
is the tutorial to config it ok?
from check_opnsense.
UNKNOWN - Could not connect to OPNsense: Certificate validation failed
and i don't know why ;-(
from check_opnsense.
This happens, if your opnsense doesn't have a valid (=trusted) cert. You have set the -k
flag to ignore the cert validation.
from check_opnsense.
Perfect - thanks a lot - it works fine ;-)
i also add this to my howto http://wombat3.kozo.ch/j/icinga-list/9780-icinga2-add-opnsense
from check_opnsense.
Related Issues (5)
- Add more check modes HOT 2
- wrong example ;-) HOT 1
- debian 10/11: Certificate validation failed HOT 2
- api changed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from check_opnsense.